-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
61 lines (50 loc) · 1.84 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
cmake_minimum_required(VERSION 3.8)
project(multidim_rrt_cpp)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rclcpp_components REQUIRED)
find_package(rmw REQUIRED)
find_package(std_msgs REQUIRED)
find_package(nav_msgs REQUIRED)
find_package(std_srvs REQUIRED)
find_package(visualization_msgs REQUIRED)
add_executable(rrt2D src/rrt2D.cpp)
ament_target_dependencies(rrt2D rclcpp)
ament_target_dependencies(rrt2D std_msgs)
ament_target_dependencies(rrt2D nav_msgs)
ament_target_dependencies(rrt2D std_srvs)
ament_target_dependencies(rrt2D visualization_msgs)
add_executable(rrt3D src/rrt3D.cpp)
ament_target_dependencies(rrt3D rclcpp)
ament_target_dependencies(rrt3D std_msgs)
ament_target_dependencies(rrt3D nav_msgs)
ament_target_dependencies(rrt3D std_srvs)
ament_target_dependencies(rrt3D visualization_msgs)
target_include_directories(rrt2D PUBLIC
${CMAKE_SOURCE_DIR}/include/multidim_rrt_cpp
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_compile_features(rrt2D PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17
install(TARGETS rrt2D
DESTINATION lib/${PROJECT_NAME})
target_include_directories(rrt3D PUBLIC
${CMAKE_SOURCE_DIR}/include/multidim_rrt_cpp
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_compile_features(rrt3D PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17
install(TARGETS rrt3D
DESTINATION lib/${PROJECT_NAME})
install(DIRECTORY
launch config
DESTINATION share/${PROJECT_NAME}/
)
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
set(ament_cmake_copyright_FOUND TRUE)
set(ament_cmake_cpplint_FOUND TRUE)
ament_lint_auto_find_test_dependencies()
endif()
ament_package()