forked from irobot-ros/ros2-performance
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
104 lines (93 loc) · 2.64 KB
/
Copy pathCMakeLists.txt
File metadata and controls
104 lines (93 loc) · 2.64 KB
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
cmake_minimum_required(VERSION 3.5)
project(composition_benchmark)
# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic")
endif()
find_package(ament_cmake REQUIRED)
find_package(irobot_interfaces_plugin REQUIRED)
find_package(performance_metrics REQUIRED)
find_package(performance_test REQUIRED)
find_package(performance_test_factory REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rclcpp_components REQUIRED)
add_library(composable_node SHARED
src/composable_node.cpp
)
target_link_libraries(composable_node PUBLIC
rclcpp::rclcpp
rclcpp_components::component
${performance_test_LIBRARIES}
)
target_include_directories(composable_node PUBLIC
include
${performance_test_INCLUDE_DIRS}
)
rclcpp_components_register_nodes(composable_node "ComposableNode")
add_library(composable_publisher SHARED
src/composable_publisher.cpp
)
target_link_libraries(composable_publisher PUBLIC
${irobot_interfaces_plugin_TARGETS}
rclcpp::rclcpp
rclcpp_components::component
rclcpp_components::component_manager
${performance_test_LIBRARIES}
)
target_include_directories(composable_publisher
PUBLIC
include
${performance_test_INCLUDE_DIRS}
)
rclcpp_components_register_nodes(composable_publisher "ComposablePublisher")
add_library(composable_subscriber SHARED
src/composable_subscriber.cpp
)
target_link_libraries(composable_subscriber PUBLIC
${irobot_interfaces_plugin_TARGETS}
rclcpp::rclcpp
rclcpp_components::component
rclcpp_components::component_manager
${performance_test_LIBRARIES}
${performance_metrics_LIBRARIES}
)
target_include_directories(composable_subscriber
PUBLIC
include
${performance_test_INCLUDE_DIRS}
${performance_metrics_INCLUDE_DIRS}
)
rclcpp_components_register_nodes(composable_subscriber "ComposableSubscriber")
add_library(base_node SHARED
src/base_node.cpp
)
target_link_libraries(base_node PUBLIC
rclcpp::rclcpp
rclcpp_components::component
rclcpp_components::component_manager
${performance_test_LIBRARIES}
${performance_metrics_LIBRARIES}
)
target_include_directories(base_node
PUBLIC
include
${performance_test_INCLUDE_DIRS}
${performance_metrics_INCLUDE_DIRS}
)
add_subdirectory(apps)
install(TARGETS
base_node
composable_node
composable_publisher
composable_subscriber
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION lib/${PROJECT_NAME}
)
ament_export_include_directories(include)
ament_export_libraries(composable_node)
ament_export_dependencies(rclcpp rclcpp_components performance_test)
ament_package()