-
Notifications
You must be signed in to change notification settings - Fork 10
/
CMakeLists.txt
71 lines (58 loc) · 1.68 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
cmake_minimum_required(VERSION 2.8.3)
project(px4_control)
## Add support for C++11, supported in ROS Kinetic and newer
# add_definitions(-std=c++11)
## 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
geometry_msgs
mavros_msgs
nav_msgs
roscpp
std_msgs
visualization_msgs
message_generation
tf
cmake_modules
)
add_message_files(DIRECTORY msg FILES
PVA.msg
)
find_package(Eigen REQUIRED)
#Add service files
add_service_files( FILES
updatePx4param.srv
)
generate_messages( DEPENDENCIES
std_msgs
geometry_msgs
)
catkin_package(
DEPENDS Eigen
# INCLUDE_DIRS include
# LIBRARIES px4_control
# CATKIN_DEPENDS geometry_msgs mavros_msgs nav_msgs roscpp std_msgs visualization_msgs
# DEPENDS system_lib
)
include_directories(
${catkin_INCLUDE_DIRS}
${Eigen_INCLUDE_DIRS}
)
add_executable(px4_control_node
src/px4_control.cpp
src/HelperFunctions/helper.cpp
src/HelperFunctions/QuatRotEuler.cpp
src/Callbacks/callbacks.cpp
src/Threads/FSMTask.cpp
src/Threads/joyTask.cpp
src/Threads/commPub.cpp
src/JoyDrivers/joyDrivers.cpp
src/PosControl/PosControl.cpp
src/pevents/pevents.cpp
src/Services/services.cpp
src/structs.cpp)
target_link_libraries(px4_control_node ${catkin_LIBRARIES})
#This makes sure that messages and services are compiled before the rest
add_dependencies(px4_control_node px4_control_generate_messages_cpp)
add_dependencies(px4_control_node ${catkin_EXPORTED_TARGETS})