-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
129 lines (103 loc) · 2.78 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
121
122
123
124
125
126
127
128
129
cmake_minimum_required(VERSION 3.0.2)
project(teb_planner_pa)
set(CMAKE_BUILD_TYPE Release)
## Find catkin macros and libraries
find_package(catkin REQUIRED COMPONENTS
roscpp
dynamic_reconfigure
teb_local_planner
nav_core
std_msgs
geometry_msgs
nav_msgs
costmap_converter
visualization_msgs
teb_planner_pa_msgs
message_generation
tf
tf_conversions
tf2_geometry_msgs
)
## C++11 support
## Unfortunately, the 3d-party dependency libg2o requires c++11 starting from ROS Jade.
## Even if the ROS Jade specifications do not want c++11-only packages,
## we cannot compile without c++11 enabled. Another option would be to downgrade
## libg2o third-party package.
## By now, if you do not want c++11, please refer to the ros indigo version.
if(NOT MSVC)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support which is required
by linked third party packages starting from ROS Jade. Ignore this message for ROS Indigo.")
endif()
endif()
#add dynamic reconfigure api
#generate_dynamic_reconfigure_options(
#cfg/TebLocalPlannerReconfigure.cfg
#)
# catkin
catkin_package(
INCLUDE_DIRS
include
LIBRARIES
teb_planner_pa
CATKIN_DEPENDS
roscpp
dynamic_reconfigure
teb_local_planner
nav_core
std_msgs
geometry_msgs
nav_msgs
costmap_converter
visualization_msgs
teb_planner_pa_msgs
tf
tf_conversions
tf2_geometry_msgs
DEPENDS
)
include_directories(
include
${catkin_INCLUDE_DIRS}
)
## Build the teb_planner_pa library
add_library(teb_planner_pa
src/visualization_pa.cpp
)
target_link_libraries(teb_planner_pa
${catkin_LIBRARIES}
)
## Build executables (planner node)
add_executable(teb_planner_node_pa src/teb_planner_node_pa.cpp)
add_dependencies(teb_planner_node_pa
teb_planner_pa
${catkin_EXPORTED_TARGETS}
)
target_link_libraries(teb_planner_node_pa
teb_planner_pa
${catkin_LIBRARIES}
)
## Build executables (test node)
add_executable(service_test_node_pa src/service_test_node_pa.cpp)
add_dependencies(service_test_node_pa
${catkin_EXPORTED_TARGETS}
)
target_link_libraries(service_test_node_pa
${catkin_LIBRARIES}
)
## Mark executables and/or libraries for installation
install(TARGETS teb_planner_node_pa service_test_node_pa
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
## Mark other files for installation (e.g. launch and bag files, etc.)
install(DIRECTORY
launch cfg
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)