-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
141 lines (113 loc) · 3.3 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
cmake_minimum_required(VERSION 3.5)
project(mrs_multirotor_simulator)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_definitions(-Wall)
add_definitions(-Wextra)
set(CATKIN_DEPENDENCIES
cmake_modules
dynamic_reconfigure
geometry_msgs
mrs_lib
mrs_msgs
mrs_uav_hw_api
nav_msgs
nodelet
roscpp
rosgraph_msgs
sensor_msgs
std_msgs
std_srvs
)
find_package(catkin REQUIRED COMPONENTS
${CATKIN_DEPENDENCIES}
)
generate_dynamic_reconfigure_options(
cfg/multirotor_simulator.cfg
)
set(LIBRARIES
MrsMultirotorSimulator_Simulator
MrsMultirotorSimulator_SimulatorSystemRos
MrsMultirotorSimulator_HwApiPlugin
)
catkin_package(
LIBRARIES ${LIBRARIES}
INCLUDE_DIRS include include/mrs_multirotor_simulator include/mrs_multirotor_simulator/uav_system include/mrs_multirotor_simulator/uav_system/controllers
CATKIN_DEPENDS ${CATKIN_DEPENDENCIES}
)
include_directories(
include
include/mrs_multirotor_simulator
include/mrs_multirotor_simulator/uav_system
include/mrs_multirotor_simulator/uav_system/controllers
${catkin_INCLUDE_DIRS}
${dynamic_reconfigure_PACKAGE_PATH}/cmake/cfgbuild.cmake
)
# ROS Wrapper for the Multirotor UAV System + controllers
add_library(MrsMultirotorSimulator_SimulatorSystemRos
src/uav_system_ros.cpp
)
add_dependencies(MrsMultirotorSimulator_SimulatorSystemRos
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS}
)
target_link_libraries(MrsMultirotorSimulator_SimulatorSystemRos
${catkin_LIBRARIES}
${Eigen_LIBRARIES}
)
# Multirotor simulator
# - ROS node with the MRS Multirotor Simulator
add_library(MrsMultirotorSimulator_Simulator
src/multirotor_simulator.cpp
)
add_dependencies(MrsMultirotorSimulator_Simulator
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS}
)
target_link_libraries(MrsMultirotorSimulator_Simulator
MrsMultirotorSimulator_SimulatorSystemRos
${catkin_LIBRARIES}
${Eigen_LIBRARIES}
)
# Hw API Plugin
# - pluginlib library for interfacing the Simulator with the MRS UAV System
add_library(MrsMultirotorSimulator_HwApiPlugin
src/hw_api_plugin.cpp
)
add_dependencies(MrsMultirotorSimulator_HwApiPlugin
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS}
)
target_link_libraries(MrsMultirotorSimulator_HwApiPlugin
${catkin_LIBRARIES}
${Eigen_LIBRARIES}
)
## --------------------------------------------------------------
## | Install |
## --------------------------------------------------------------
install(TARGETS ${LIBRARIES}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
install(DIRECTORY launch config
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(DIRECTORY tmux/
USE_SOURCE_PERMISSIONS
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/tmux
)
install(DIRECTORY include/mrs_multirotor_simulator/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
install(DIRECTORY scripts/
USE_SOURCE_PERMISSIONS
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY scripts
USE_SOURCE_PERMISSIONS
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(FILES nodelets.xml plugins.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)