forked from tiiuae/control_interface
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
83 lines (69 loc) · 1.99 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
cmake_minimum_required(VERSION 3.5)
project(control_interface)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
add_definitions("-Wall")
add_definitions("-Wextra")
add_definitions("-Wpedantic")
add_definitions("-g")
# add_definitions("-O3")
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rclcpp_components REQUIRED)
find_package(std_msgs REQUIRED)
find_package(std_srvs REQUIRED)
find_package(px4_msgs REQUIRED)
find_package(fog_msgs 0.0.6 REQUIRED)
find_package(nav_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(visualization_msgs REQUIRED)
find_package(tf2 REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(MAVSDK 0.42.0 EXACT REQUIRED)
find_package(Threads REQUIRED)
## --------------------------------------------------------------
## | compile |
## --------------------------------------------------------------
add_library(control_interface SHARED
src/control_interface.cpp
)
target_compile_definitions(control_interface
PRIVATE "${PROJECT_NAME}_BUILDING_DLL")
ament_target_dependencies(control_interface
rclcpp
rclcpp_components
std_msgs
nav_msgs
std_srvs
fog_msgs
px4_msgs
geometry_msgs
visualization_msgs
tf2
tf2_ros
MAVSDK
Threads
)
target_link_libraries(control_interface
MAVSDK::mavsdk_action
MAVSDK::mavsdk_mission
MAVSDK::mavsdk
)
rclcpp_components_register_nodes(control_interface PLUGIN "${PROJECT_NAME}::ControlInterface" EXECUTABLE control_interface)
## --------------------------------------------------------------
## | install |
## --------------------------------------------------------------
install(TARGETS
control_interface
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
install(DIRECTORY launch
DESTINATION share/${PROJECT_NAME}
)
install(DIRECTORY config
DESTINATION share/${PROJECT_NAME}
)
ament_package()