-
Notifications
You must be signed in to change notification settings - Fork 53
/
CMakeLists.txt
95 lines (82 loc) · 2.81 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
cmake_minimum_required(VERSION 3.5)
project(state_lattice_planner)
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
find_package(catkin REQUIRED COMPONENTS
geometry_msgs
roscpp
rospy
std_msgs
tf
cmake_modules
tf2
tf2_ros
tf2_geometry_msgs
)
find_package(Eigen3 REQUIRED COMPONENTS system)
find_package(OpenMP REQUIRED)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
catkin_package(
INCLUDE_DIRS include
LIBRARIES state_lattice_planner_lib lookup_table_generator_lib trajectory_generator_diff_drive motion_model_diff_drive
# CATKIN_DEPENDS geometry_msgs roscpp rospy std_msgs
# DEPENDS system_lib
)
include_directories(
include
${catkin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
add_library(motion_model_diff_drive
src/motion_model_diff_drive.cpp
)
add_library(trajectory_generator_diff_drive
src/trajectory_generator_diff_drive.cpp
)
add_library(lookup_table_generator_lib
src/lookup_table_generator.cpp
src/lookup_table_utils.cpp
)
add_library(state_lattice_planner_lib
src/state_lattice_planner.cpp
src/lookup_table_utils.cpp
)
add_dependencies(lookup_table_generator_lib ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_dependencies(state_lattice_planner_lib ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_dependencies(motion_model_diff_drive ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_dependencies(trajectory_generator_diff_drive ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_executable(state_lattice_planner src/state_lattice_planner_node.cpp src/state_lattice_planner_ros.cpp)
add_executable(lookup_table_generator src/lookup_table_generator_node.cpp)
add_executable(trajectory_viewer src/trajectory_viewer.cpp src/lookup_table_utils.cpp)
add_dependencies(state_lattice_planner ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_dependencies(lookup_table_generator ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_dependencies(trajectory_viewer ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(state_lattice_planner
${catkin_LIBRARIES}
state_lattice_planner_lib
trajectory_generator_diff_drive
motion_model_diff_drive
)
target_link_libraries(lookup_table_generator
${catkin_LIBRARIES}
lookup_table_generator_lib
trajectory_generator_diff_drive
motion_model_diff_drive
)
target_link_libraries(trajectory_viewer
${catkin_LIBRARIES}
trajectory_generator_diff_drive
motion_model_diff_drive
)
if(CATKIN_ENABLE_TESTING)
find_package(roslint REQUIRED)
set(ROSLINT_CPP_OPTS "--filter=-build/c++11,-runtime/references")
roslint_cpp()
roslint_add_test()
find_package(rostest REQUIRED)
add_subdirectory(test)
endif()