-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathFindqpOASES.cmake
41 lines (32 loc) · 1.44 KB
/
FindqpOASES.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# SPDX-FileCopyrightText: 2012-2021 Istituto Italiano di Tecnologia (IIT)
# SPDX-License-Identifier: BSD-3-Clause
#[=======================================================================[.rst:
FindqpOASES
-----------
Try to find the qpOASES library.
Once done this will define the following variables::
qpOASES_FOUND - System has qpOASES
qpOASES_INCLUDE_DIRS - qpOASES include directory
qpOASES_LIBRARIES - qpOASES libraries
qpOASES does not have an "install" step, and the includes are in the source
tree, while the libraries are in the build tree.
Therefore the environment and cmake variables `qpOASES_SOURCE_DIR` and
`qpOASES_BINARY_DIR` will be used to locate the includes and libraries.
#]=======================================================================]
include(FindPackageHandleStandardArgs)
find_path(qpOASES_INCLUDEDIR
NAMES qpOASES.hpp
HINTS "${qpOASES_SOURCE_DIR}"
ENV qpOASES_SOURCE_DIR
PATH_SUFFIXES include)
find_library(qpOASES_LIB
NAMES qpOASES
HINTS "${qpOASES_BINARY_DIR}"
ENV qpOASES_BINARY_DIR
PATH_SUFFIXES lib
libs)
set(qpOASES_INCLUDE_DIRS ${qpOASES_INCLUDEDIR})
set(qpOASES_LIBRARIES ${qpOASES_LIB})
find_package_handle_standard_args(qpOASES DEFAULT_MSG qpOASES_LIBRARIES
qpOASES_INCLUDE_DIRS)
set(qpOASES_FOUND ${QPOASES_FOUND})