-
Notifications
You must be signed in to change notification settings - Fork 18
/
CMakeLists.txt
executable file
·99 lines (83 loc) · 2.26 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
cmake_minimum_required(VERSION 2.8.3)
project(dji_sdk)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
roscpp
std_msgs
nav_msgs
geometry_msgs
message_generation
)
find_package(PythonLibs "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" REQUIRED)
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
## Generate messages in the 'msg' folder
add_message_files(
FILES
attitude_quad.msg
global_position.msg
velocity.msg
acc.msg
gimbal.msg
local_position.msg
rc_channels.msg
)
## Generate services in the 'srv' folder
add_service_files(
FILES
set_local_position_ref.srv
set_lookat_local.srv
set_gimbal_angles.srv
set_velocity.srv
fly_to_local.srv
)
## Generate actions in the 'action' folder
# add_action_files(
# FILES
# Action1.action
# Action2.action
# )
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
std_msgs
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES dji_sdk
CATKIN_DEPENDS roscpp std_msgs rospy nav_msgs geometry_msgs
DEPENDS system_lib
)
file(GLOB DJI_SDK_LIB_SOURCES src/sdk_lib/*.cpp)
include_directories(
${catkin_INCLUDE_DIRS}
"${PROJECT_SOURCE_DIR}/src/"
"${PROJECT_SOURCE_DIR}/include"
../../devel/include
ex_include/
)
## Declare a cpp executable
add_executable(dji_sdk_node src/dji_sdk_node.cpp
src/modules/dji_gimbal.cpp
src/modules/dji_services.cpp
src/modules/dji_variable.cpp
src/modules/dji_subscribers.cpp
${DJI_SDK_LIB_SOURCES}
src/modules/dji_services.cpp
include/dji_sdk/dji_services.h
src/modules/dji_publishers.cpp
include/dji_sdk/dji_publishers.h
include/dji_sdk/dji_subscribers.h
src/modules/motion_controls.cpp
src/modules/dji_mavlink_adapter.cpp
src/modules/mavlink_connector.cpp
src/modules/dji_commands.cpp
)
## Add cmake target dependencies of the executable/library
## as an example, message headers may need to be generated before nodes
add_dependencies(dji_sdk_node dji_sdk_generate_messages_cpp)
## Specify libraries to link a library or executable target against
target_link_libraries(dji_sdk_node
${catkin_LIBRARIES}
)