|
| 1 | +#.rst: |
| 2 | +# FindqpOASES |
| 3 | +# ----------- |
| 4 | +# |
| 5 | +# Try to find the qpOASES library. |
| 6 | +# Once done this will define the following variables:: |
| 7 | +# |
| 8 | +# qpOASES_FOUND - System has qpOASES |
| 9 | +# qpOASES_INCLUDE_DIRS - qpOASES include directory |
| 10 | +# qpOASES_LIBRARIES - qpOASES libraries |
| 11 | +# |
| 12 | +# qpOASES does not have an "install" step, and the includes are in the source |
| 13 | +# tree, while the libraries are in the build tree. |
| 14 | +# Therefore the environment and cmake variables `qpOASES_SOURCE_DIR` and |
| 15 | +# `qpOASES_BINARY_DIR` will be used to locate the includes and libraries. |
| 16 | + |
| 17 | +#============================================================================= |
| 18 | +# Copyright 2014 iCub Facility, Istituto Italiano di Tecnologia |
| 19 | +# Authors: Daniele E. Domenichelli <[email protected]> |
| 20 | +# |
| 21 | +# Distributed under the OSI-approved BSD License (the "License"); |
| 22 | +# see accompanying file Copyright.txt for details. |
| 23 | +# |
| 24 | +# This software is distributed WITHOUT ANY WARRANTY; without even the |
| 25 | +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 26 | +# See the License for more information. |
| 27 | +#============================================================================= |
| 28 | +# (To distribute this file outside of YCM, substitute the full |
| 29 | +# License text for the above reference.) |
| 30 | + |
| 31 | + |
| 32 | +include(FindPackageHandleStandardArgs) |
| 33 | + |
| 34 | +find_path(qpOASES_INCLUDEDIR |
| 35 | + NAMES qpOASES.hpp |
| 36 | + HINTS "${qpOASES_SOURCE_DIR}" |
| 37 | + ENV qpOASES_SOURCE_DIR |
| 38 | + PATH_SUFFIXES include) |
| 39 | +find_library(qpOASES_LIB |
| 40 | + NAMES qpOASES |
| 41 | + HINTS "${qpOASES_BINARY_DIR}" |
| 42 | + ENV qpOASES_BINARY_DIR |
| 43 | + PATH_SUFFIXES lib |
| 44 | + libs) |
| 45 | + |
| 46 | +set(qpOASES_INCLUDE_DIRS ${qpOASES_INCLUDEDIR}) |
| 47 | +set(qpOASES_LIBRARIES ${qpOASES_LIB}) |
| 48 | + |
| 49 | +find_package_handle_standard_args(qpOASES DEFAULT_MSG qpOASES_LIBRARIES |
| 50 | + qpOASES_INCLUDE_DIRS) |
| 51 | +set(qpOASES_FOUND ${QPOASES_FOUND}) |
0 commit comments