forked from rock-core/base-types
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
46 lines (37 loc) · 1.45 KB
/
CMakeLists.txt
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
42
43
44
45
46
cmake_minimum_required(VERSION 2.6)
find_package(Rock)
rock_init(base 1.0)
# rock_export_includedir(${PROJECT_SOURCE_DIR}/base ${PROJECT_NAME})
rock_export_includedir(${PROJECT_SOURCE_DIR}/src base/geometry)
include_directories(BEFORE ${PROJECT_SOURCE_DIR})
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/DownloadBoost.cmake)
if (INSTALL_BOOST_IF_REQUIRED)
rock_find_cmake(Boost)
if (NOT Boost_FOUND)
# download and install boost header only
download_boost_if_needed()
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/external/${BOOST_SUBDIRECTORY})
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/external/${BOOST_SUBDIRECTORY}/boost
DESTINATION include)
endif()
else()
rock_find_cmake(Boost COMPONENTS system REQUIRED)
endif()
rock_find_pkgconfig(Eigen3 eigen3 REQUIRED)
# For forward compatibility. Test was a toplevel target
if (EXISTS ${CMAKE_CURRENT_BINARY_DIR}/test)
if (NOT IS_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/test)
FILE(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/test)
endif()
endif()
# SISL as optional dependency
option(USE_SISL "set to OFF to disable the usage of SISL." ON)
if(USE_SISL)
rock_find_cmake(SISL)
if(NOT SISL_FOUND)
message(FATAL_ERROR "The usage of SISL is requested, but the library could not be found."
" Either make sure SISL is installed, or disable the usage via"
" -DUSE_SISL=OFF")
endif(NOT SISL_FOUND)
endif()
rock_standard_layout()