-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
66 lines (56 loc) · 2.2 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
cmake_minimum_required(VERSION 2.8)
PROJECT( sbpl )
# version (e.g. for packaging)
set(SBPL_MAJOR_VERSION 1)
set(SBPL_MINOR_VERSION 2)
set(SBPL_PATCH_VERSION 0)
set(SBPL_VERSION ${SBPL_MAJOR_VERSION}.${SBPL_MINOR_VERSION}.${SBPL_PATCH_VERSION})
set(CMAKE_BUILD_TYPE Release)
include_directories(src/include)
add_library(sbpl SHARED
src/discrete_space_information/environment_nav2D.cpp
src/discrete_space_information/environment_navxythetalat.cpp
src/discrete_space_information/environment_navxythetamlevlat.cpp
src/discrete_space_information/environment_nav2Duu.cpp
src/discrete_space_information/environment_XXX.cpp
src/discrete_space_information/environment_robarm.cpp
src/planners/araplanner.cpp
src/planners/adplanner.cpp
src/planners/viplanner.cpp
src/planners/ppcpplanner.cpp
src/planners/ANAplanner.cpp
src/planners/rstarplanner.cpp
src/planners/lazyARA.cpp
src/utils/heap.cpp
src/utils/mdp.cpp
src/utils/utils.cpp
src/utils/2Dgridsearch.cpp
src/utils/config.cpp
)
set(SBPL_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include")
set(SBPL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
# support for pkg-config
set(PKG_NAME "sbpl")
set(PKG_DESC "The Search Based Planning Library")
set(PKG_SBPL_LIBS "-lsbpl")
set(pkg_conf_file_in "${CMAKE_CURRENT_SOURCE_DIR}/sbpl.pc.in")
set(pkg_conf_file "${PROJECT_BINARY_DIR}/InstallFiles/sbpl.pc")
configure_file("${pkg_conf_file_in}" "${pkg_conf_file}" @ONLY)
install(FILES ${pkg_conf_file} DESTINATION lib/pkgconfig/ COMPONENT pkgconfig)
# support for cmake-config:
configure_file(sbpl-config.cmake.in
"${PROJECT_BINARY_DIR}/InstallFiles/sbpl-config.cmake" @ONLY)
configure_file(sbpl-config-version.cmake.in
"${PROJECT_BINARY_DIR}/InstallFiles/sbpl-config-version.cmake" @ONLY)
install(FILES
"${PROJECT_BINARY_DIR}/InstallFiles/sbpl-config.cmake"
"${PROJECT_BINARY_DIR}/InstallFiles/sbpl-config-version.cmake"
DESTINATION share/sbpl/)
install(DIRECTORY src/include/sbpl DESTINATION include
FILES_MATCHING PATTERN "*.h")
install(TARGETS sbpl
LIBRARY DESTINATION lib)
add_executable(test_sbpl src/test/main.cpp)
target_link_libraries(test_sbpl sbpl)
add_executable(test_adjacency_list src/test/test_adjacency_list.cpp)
target_link_libraries(test_adjacency_list sbpl)