forked from saarnold/base-types
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
40 lines (30 loc) · 1.25 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
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()
rock_standard_layout()
configure_file(base-types.pc.in base-types.pc @ONLY)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/base DESTINATION include)
install(FILES ${CMAKE_BINARY_DIR}/base-types.pc DESTINATION lib/pkgconfig)