Skip to content

Commit c0177a4

Browse files
committed
Export project dependencies
1 parent 463b756 commit c0177a4

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,15 @@ install(
135135
RUNTIME DESTINATION bin
136136
)
137137
ament_export_targets(export_${PROJECT_NAME} HAS_LIBRARY_TARGET)
138+
ament_export_dependencies(
139+
async_web_server_cpp
140+
cv_bridge
141+
image_transport
142+
pluginlib
143+
rclcpp
144+
rmw
145+
sensor_msgs
146+
)
138147

139148
set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME ${PROJECT_NAME})
140149
install(
@@ -159,4 +168,6 @@ if(BUILD_TESTING)
159168
ament_lint_auto_find_test_dependencies()
160169
endif()
161170

162-
ament_package()
171+
ament_package(
172+
CONFIG_EXTRAS "config-extras.cmake"
173+
)

config-extras.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# ament_export_dependencies fails to propagate Boost components
2+
# so we need to explicitly find Boost here
3+
find_package(Boost REQUIRED COMPONENTS system)

0 commit comments

Comments
 (0)