-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
97 lines (78 loc) · 2.17 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
cmake_minimum_required(VERSION 3.5)
project(mrs_gazebo_extras_resources)
set(CATKIN_DEPENDENCIES
cv_bridge
gazebo_plugins
gazebo_ros
geometry_msgs
mrs_lib
mrs_msgs
roscpp
std_msgs
tf2
tf2_msgs
tf2_ros
)
find_package(catkin REQUIRED COMPONENTS
${CATKIN_DEPENDENCIES}
)
# include Gazebo
find_package(gazebo REQUIRED)
ign_import_target(UUID)
# include OpenCV
find_package(OpenCV REQUIRED)
## Find Boost
find_package(Boost REQUIRED COMPONENTS thread)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
###################################
## catkin specific configuration ##
###################################
set(LIBRARIES
MrsGazeboExtrasResources_AttacherPlugin MrsGazeboExtrasResources_ThermalCameraPlugin
)
catkin_package(
DEPENDS GAZEBO Boost
CATKIN_DEPENDS ${CATKIN_DEPENDENCIES}
LIBRARIES ${LIBRARIES}
)
## --------------------------------------------------------------
## | Build |
## --------------------------------------------------------------
include_directories(
${catkin_INCLUDE_DIRS}
${GAZEBO_INCLUDE_DIRS}
${GAZEBO_MSG_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
link_directories(${GAZEBO_LIBRARY_DIRS})
add_library(MrsGazeboExtrasResources_AttacherPlugin
src/link_attacher.cpp
)
target_link_libraries(MrsGazeboExtrasResources_AttacherPlugin
${catkin_LIBRARIES}
${GAZEBO_LIBRARIES}
)
add_library(MrsGazeboExtrasResources_ThermalCameraPlugin
src/thermal_camera.cpp
)
target_link_libraries(MrsGazeboExtrasResources_ThermalCameraPlugin
${GAZEBO_LIBRARIES}
${catkin_LIBRARIES}
${Boost_LIBRARIES}
${OpenCV_LIBRARIES}
CameraPlugin
)
## --------------------------------------------------------------
## | Install |
## --------------------------------------------------------------
install(TARGETS ${LIBRARIES}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
install(DIRECTORY models
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)