-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
94 lines (74 loc) · 2.53 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
cmake_minimum_required(VERSION 3.8)
project(rviz_birdeye_display)
# find dependencies
find_package(ament_cmake REQUIRED)
find_package(rviz_common REQUIRED)
find_package(rviz_rendering REQUIRED)
find_package(rviz_ogre_vendor REQUIRED)
find_package(spatz_interfaces REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(OpenCV REQUIRED)
set(rviz_birdeye_display_headers_to_moc
include/rviz_birdeye_display/BirdeyeDisplay.hpp
)
foreach (header "${rviz_birdeye_display_headers_to_moc}")
qt5_wrap_cpp(rviz_birdeye_display_moc_files "${header}")
endforeach ()
set(rviz_birdeye_display_source_files
src/rviz_birdeye_display/BirdeyeDisplay.cpp
)
add_library(rviz_birdeye_display SHARED
${rviz_birdeye_display_moc_files}
${rviz_birdeye_display_source_files}
)
set_property(TARGET rviz_birdeye_display PROPERTY CXX_STANDARD 17)
target_compile_options(rviz_birdeye_display PRIVATE -Wall -Wextra -Wpedantic)
target_include_directories(rviz_birdeye_display PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
${Qt5Widgets_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
target_link_libraries(rviz_birdeye_display PUBLIC
rviz_ogre_vendor::OgreMain
rviz_ogre_vendor::OgreOverlay
opencv_core
opencv_imgproc
opencv_highgui
)
# Causes the visibility macros to use dllexport rather than dllimport,
# which is appropriate when building the dll but not consuming it.
target_compile_definitions(rviz_birdeye_display PRIVATE "rviz_birdeye_display_BUILDING_LIBRARY")
# prevent pluginlib from using boost
target_compile_definitions(rviz_birdeye_display PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS")
pluginlib_export_plugin_description_file(rviz_common plugins_description.xml)
ament_target_dependencies(rviz_birdeye_display
PUBLIC
sensor_msgs
spatz_interfaces
rviz_common
rviz_rendering
)
ament_export_include_directories(include)
ament_export_targets(rviz_birdeye_display HAS_LIBRARY_TARGET)
ament_export_dependencies(
rviz_common
sensor_msgs
spatz_interfaces
rviz_ogre_vendor
)
install(
TARGETS rviz_birdeye_display
EXPORT rviz_birdeye_display
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)
install(
DIRECTORY include/
DESTINATION include
)
ament_package(
CONFIG_EXTRAS "rviz_birdeye_display-extras.cmake"
)