-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
137 lines (121 loc) · 3.06 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
130
131
132
133
134
135
136
137
cmake_minimum_required(VERSION 2.8.3)
project(global_planner)
## C++11
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 -Wall")
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. Please use a different C++ compiler.")
endif()
find_package(catkin REQUIRED
COMPONENTS
angles
costmap_2d
dynamic_reconfigure
geometry_msgs
nav_core
navfn
nav_msgs
pluginlib
roscpp
tf
base_local_planner
)
generate_dynamic_reconfigure_options(
cfg/GlobalPlanner.cfg
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS
costmap_2d
dynamic_reconfigure
geometry_msgs
nav_core
navfn
nav_msgs
pluginlib
roscpp
tf
pcl
)
## OPEN MOTION PLANNING LIBRARY
find_package(OMPL REQUIRED)
if(NOT OMPL_FOUND)
message(AUTHOR_WARNING,"Open Motion Planning Library not found")
endif(NOT OMPL_FOUND)
include_directories(
include
${catkin_INCLUDE_DIRS}
)
include_directories(
include
${OMPL_INCLUDE_DIRS}
)
include_directories(
include
include
)
add_library(${PROJECT_NAME}
src/planner_core.cpp
src/costmap_model.cpp
src/algorithm/algorithm.cpp
src/algorithm/AStar.cpp
src/algorithm/HAStar.cpp
src/algorithm/primitive.cpp
src/collisiondetection.cpp
src/dynamicvoronoi.cpp
src/node2d.cpp
src/pose2d.cpp
src/planner.cpp
include/planner_core.h
include/world_model.h
include/costmap_model.h
include/line_iterator.h
include/algorithm/algorithm.h
include/algorithm/AStar.h
include/algorithm/HAStar.h
include/algorithm/primitive.h
include/collisiondetection.h
include/constants.h
include/dynamicvoronoi.h
include/helper.h
include/lookup.h
include/node2d.h
include/pose2d.h
include/planner.h
)
add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${OMPL_LIBRARIES})
add_executable(planner
src/plan_node.cpp
src/costmap_model.cpp
src/algorithm/algorithm.cpp
src/algorithm/AStar.cpp
src/algorithm/HAStar.cpp
src/algorithm/primitive.cpp
src/collisiondetection.cpp
src/dynamicvoronoi.cpp
src/node2d.cpp
src/pose2d.cpp
src/planner.cpp
)
add_dependencies(planner ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(planner
${PROJECT_NAME}
${catkin_LIBRARIES}
)
install(TARGETS ${PROJECT_NAME} planner
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
PATTERN ".svn" EXCLUDE)
install(FILES bgp_plugin.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})