-
Notifications
You must be signed in to change notification settings - Fork 22
/
CMakeLists.txt
120 lines (83 loc) · 2.49 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
cmake_minimum_required(VERSION 2.8.3)
project(srl_rhcf_planner)
ADD_DEFINITIONS(-std=c++0x) # C++ 11 is required
find_package(catkin REQUIRED COMPONENTS
geometry_msgs
nav_core
nav_msgs
spencer_tracking_msgs
spencer_nav_msgs
spencer_control_msgs
pluginlib
costmap_2d
roscpp
rospy
std_msgs
tf
visualization_msgs
)
find_package(cmake_modules REQUIRED)
# add qt4 to the project
FIND_PACKAGE(Eigen REQUIRED)
FIND_PACKAGE(Boost REQUIRED)
catkin_package(
CATKIN_DEPENDS
geometry_msgs
nav_core
nav_msgs
roscpp
rospy
std_msgs
tf
visualization_msgs
costmap_2d
pluginlib
spencer_tracking_msgs
spencer_nav_msgs
spencer_control_msgs
LIBRARIES
srl_rhcf_planner
)
FIND_PACKAGE( OpenMP REQUIRED)
if(OPENMP_FOUND)
message("OPENMP FOUND")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
###########
## Build ##
###########
include_directories(${Eigen_INCLUDE_DIRS})
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/include/
${CMAKE_CURRENT_SOURCE_DIR}/src/
${CMAKE_CURRENT_SOURCE_DIR}
${catkin_INCLUDE_DIRS}
)
# RRT PLANNER
## Declare KdTree lib
add_library(SRLRHCFPLANNER_KDTREE_LIB ${CMAKE_CURRENT_SOURCE_DIR}/include/srl_rhcf_planner/smp/external_libraries/kdtree/kdtree.c)
# Setting SOURCES variables
set(SOURCES_RRT src/srl_rhcf_planner.cpp include/srl_rhcf_planner/srl_rhcf_planner.h)
set(SOURCES
src/grid_planner.cpp include/srl_rhcf_planner/grid_planner.h include/srl_rhcf_planner/costmap_model.cpp include/srl_rhcf_planner/trajectory.cpp include/srl_rhcf_planner/grid.cpp include/srl_rhcf_planner/cell.cpp
src/rhcf.cpp
src/dynamicweightedvoronoi.cpp
)
# Plugin
add_library(srl_rhcf_planner ${SOURCES_RRT} ${SOURCES})
target_link_libraries(srl_rhcf_planner ${catkin_LIBRARIES} ${BOOST_LIBRARIES} SRLRHCFPLANNER_KDTREE_LIB)
add_dependencies(srl_rhcf_planner srl_rhcf_planner_gencfg ${catkin_EXPORTED_TARGETS})
add_dependencies(srl_rhcf_planner nav_msgs_gencpp)
install(TARGETS srl_rhcf_planner
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)
install(FILES srl_rhcf_planner_plugin.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
PATTERN ".svn" EXCLUDE
)