-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
126 lines (101 loc) · 2.8 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
cmake_minimum_required(VERSION 3.5)
project(mrs_uav_unreal_simulation)
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
mrs_multirotor_simulator
)
find_package(catkin REQUIRED COMPONENTS
${CATKIN_DEPENDENCIES}
)
generate_dynamic_reconfigure_options(
cfg/unreal_simulator.cfg
)
set(LIBRARIES
MrsUavUnrealSimulation_Simulator
MrsUavUnrealSimulation_HwApiPlugin
MrsUavUnrealSimulation_UedsConnector
)
catkin_package(
LIBRARIES ${LIBRARIES}
INCLUDE_DIRS include
CATKIN_DEPENDS ${CATKIN_DEPENDENCIES}
)
include_directories(
include
${catkin_INCLUDE_DIRS}
${dynamic_reconfigure_PACKAGE_PATH}/cmake/cfgbuild.cmake
)
## | --------------------- UEDS connector --------------------- |
add_library(MrsUavUnrealSimulation_UedsConnector
src/ueds_connector/socket_client.cpp
src/ueds_connector/ueds_connector.cpp
src/ueds_connector/game_mode_controller.cpp
)
## | ------------------------ Simulator ----------------------- |
add_library(MrsUavUnrealSimulation_Simulator
src/unreal_simulator.cpp
)
add_dependencies(MrsUavUnrealSimulation_Simulator
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS}
)
target_link_libraries(MrsUavUnrealSimulation_Simulator
MrsUavUnrealSimulation_UedsConnector
${LIB_UEDS_CONNECTOR}
${catkin_LIBRARIES}
${Eigen_LIBRARIES}
)
## | ---------------------- HW Api Plugin --------------------- |
add_library(MrsUavUnrealSimulation_HwApiPlugin
src/hw_api_plugin.cpp
)
add_dependencies(MrsUavUnrealSimulation_HwApiPlugin
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS}
)
target_link_libraries(MrsUavUnrealSimulation_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 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}
)