-
Notifications
You must be signed in to change notification settings - Fork 720
/
Copy pathCMakeLists.txt
63 lines (52 loc) · 2.02 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
cmake_minimum_required(VERSION 3.14)
project(autoware_perception_rviz_plugin)
find_package(autoware_cmake REQUIRED)
autoware_package()
find_package(pluginlib REQUIRED)
find_package(Qt5 REQUIRED COMPONENTS Widgets)
set(OD_PLUGIN_LIB_SRC
src/object_detection/detected_objects_display.cpp
src/object_detection/tracked_objects_display.cpp
src/object_detection/predicted_objects_display.cpp
)
set(OD_PLUGIN_LIB_HEADERS
include/autoware_perception_rviz_plugin/visibility_control.hpp
)
set(OD_PLUGIN_LIB_HEADERS_TO_WRAP
include/autoware_perception_rviz_plugin/object_detection/detected_objects_display.hpp
include/autoware_perception_rviz_plugin/object_detection/tracked_objects_display.hpp
include/autoware_perception_rviz_plugin/object_detection/predicted_objects_display.hpp
)
set(COMMON_HEADERS
include/autoware_perception_rviz_plugin/common/color_alpha_property.hpp
include/autoware_perception_rviz_plugin/object_detection/object_polygon_detail.hpp
include/autoware_perception_rviz_plugin/object_detection/object_polygon_display_base.hpp
)
set(COMMON_SRC
src/common/color_alpha_property.cpp
src/object_detection/object_polygon_detail.cpp
)
foreach(header "${OD_PLUGIN_LIB_HEADERS_TO_WRAP}")
qt5_wrap_cpp(OD_PLUGIN_LIB_HEADERS_MOC "${header}")
endforeach()
ament_auto_add_library(${PROJECT_NAME} SHARED
${COMMON_HEADERS}
${COMMON_SRC}
${OD_PLUGIN_LIB_HEADERS}
${OD_PLUGIN_LIB_HEADERS_MOC}
${OD_PLUGIN_LIB_SRC}
)
target_link_libraries(${PROJECT_NAME}
rviz_common::rviz_common
Qt5::Widgets
)
target_include_directories(${PROJECT_NAME} PRIVATE include)
# Settings to improve the build as suggested on https://github.com/ros2/rviz/blob/ros2/docs/plugin_development.md
target_compile_definitions(${PROJECT_NAME} PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS")
target_compile_definitions(${PROJECT_NAME} PRIVATE "OBJECT_DETECTION_PLUGINS_BUILDING_LIBRARY")
# Export the plugin to be imported by rviz2
pluginlib_export_plugin_description_file(rviz_common plugins_description.xml)
ament_auto_package(
INSTALL_TO_SHARE
icons
)