forked from orocos-toolchain/rtt
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFindEcos.cmake
25 lines (19 loc) · 984 Bytes
/
FindEcos.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
# This macro is a dirty hack, Orocos specific. Don't base your macros on it, look into the other
# Find*cmake files for better examples
# This script creates the following variables:
# Ecos_FOUND: Boolean that indicates if the package was found
# Ecos_INCLUDE_DIRS: Paths to the necessary header files
# Ecos_LIBRARIES: Package libraries
set(ECOS_INSTALL_DIR ${ECOS_INSTALL_DIR} CACHE PATH "path to ecos installation dir" FORCE)
if (ECOS_INSTALL_DIR STREQUAL "")
set(ECOS_INSTALL_DIR "/opt/ecos/install")
endif (ECOS_INSTALL_DIR STREQUAL "")
if(EXISTS ${ECOS_INSTALL_DIR}/include/pkgconf/system.h)
message("-- Looking for ECOS - found in ${ECOS_INSTALL_DIR}")
set(ECOS_FOUND TRUE)
set(ECOS_INCLUDE_DIRS ${ECOS_INSTALL_DIR}/include )
set(ECOS_LIBRARIES -L${ECOS_INSTALL_DIR}/lib -ltarget )
else()
message(FATAL_ERROR "-- Looking for ECOS - not found (tried: ${ECOS_INSTALL_DIR}/include/pkgconf/system.h)")
set(ECOS_FOUND FALSE)
ENDIF()