forked from karlkurzer/path_planner
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
88 lines (75 loc) · 3.29 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
cmake_minimum_required(VERSION 2.8.3)
project(hybrid_astar)
## 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
roscpp
rospy
std_msgs
tf
)
set(SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/algorithm.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/node2d.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/node3d.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/collisiondetection.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/planner.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/path.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/smoother.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/visualize.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/dubins.cpp #Andrew Walker
${CMAKE_CURRENT_SOURCE_DIR}/src/dynamicvoronoi.cpp #Boris Lau, Christoph Sprunk, Wolfram Burgard
${CMAKE_CURRENT_SOURCE_DIR}/src/bucketedqueue.cpp #Boris Lau, Christoph Sprunk, Wolfram Burgard
)
set(HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/include/algorithm.h
${CMAKE_CURRENT_SOURCE_DIR}/include/node2d.h
${CMAKE_CURRENT_SOURCE_DIR}/include/node3d.h
${CMAKE_CURRENT_SOURCE_DIR}/include/collisiondetection.h
${CMAKE_CURRENT_SOURCE_DIR}/include/planner.h
${CMAKE_CURRENT_SOURCE_DIR}/include/path.h
${CMAKE_CURRENT_SOURCE_DIR}/include/smoother.h
${CMAKE_CURRENT_SOURCE_DIR}/include/vector2d.h
${CMAKE_CURRENT_SOURCE_DIR}/include/visualize.h
${CMAKE_CURRENT_SOURCE_DIR}/include/helper.h
${CMAKE_CURRENT_SOURCE_DIR}/include/constants.h
${CMAKE_CURRENT_SOURCE_DIR}/include/lookup.h
${CMAKE_CURRENT_SOURCE_DIR}/include/gradient.h #Andrew Noske
${CMAKE_CURRENT_SOURCE_DIR}/include/dubins.h #Andrew Walker
${CMAKE_CURRENT_SOURCE_DIR}/include/dynamicvoronoi.h #Boris Lau, Christoph Sprunk, Wolfram Burgard
${CMAKE_CURRENT_SOURCE_DIR}/include/bucketedqueue.h #Boris Lau, Christoph Sprunk, Wolfram Burgard
${CMAKE_CURRENT_SOURCE_DIR}/include/point.h #Boris Lau, Christoph Sprunk, Wolfram Burgard
)
add_library(HYAS ${SOURCES} ${HEADERS})
## Declare a catkin package
catkin_package()
## 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_executable(tf_broadcaster src/tf_broadcaster.cpp)
target_link_libraries(tf_broadcaster ${catkin_LIBRARIES})
add_executable(hybrid_astar src/main.cpp ${HEADERS} ${SOURCES})
target_link_libraries(hybrid_astar ${catkin_LIBRARIES})
target_link_libraries(hybrid_astar ${OMPL_LIBRARIES})
install(TARGETS ${PROJECT_NAME} tf_broadcaster
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
)