From 7eafb36ab7c1993014d4998c5c9aa5e69759e98f Mon Sep 17 00:00:00 2001 From: "David V. Lu" Date: Wed, 7 May 2025 17:12:20 -0400 Subject: [PATCH 1/2] [kilted] Update deprecated call to ament_target_dependencies --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ef93e56..cc2c5eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ set(COMPONENT_AMENT_DEPENDENCIES add_library(${PROJECT_NAME} SHARED src/adaptive_component.cpp) target_compile_definitions(${PROJECT_NAME} PRIVATE "COMPOSITION_BUILDING_DLL") -ament_target_dependencies(${PROJECT_NAME} ${COMPONENT_AMENT_DEPENDENCIES}) +target_link_libraries(${PROJECT_NAME} PUBLIC ${COMPONENT_AMENT_DEPENDENCIES}) rclcpp_components_register_nodes(${PROJECT_NAME} "composition::AdaptiveComponent") set(node_plugins "${node_plugins}composition::AdaptiveComponent;$\n") From 3aade698de204ed96e510e042f67d7cecfaa18f4 Mon Sep 17 00:00:00 2001 From: "David V. Lu" Date: Thu, 8 May 2025 14:40:11 -0400 Subject: [PATCH 2/2] Fix targets --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cc2c5eb..6a599fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,10 @@ set(COMPONENT_AMENT_DEPENDENCIES add_library(${PROJECT_NAME} SHARED src/adaptive_component.cpp) target_compile_definitions(${PROJECT_NAME} PRIVATE "COMPOSITION_BUILDING_DLL") -target_link_libraries(${PROJECT_NAME} PUBLIC ${COMPONENT_AMENT_DEPENDENCIES}) +target_link_libraries(${PROJECT_NAME} PUBLIC + rclcpp::rclcpp + rclcpp_components::component + rclcpp_components::component_manager) rclcpp_components_register_nodes(${PROJECT_NAME} "composition::AdaptiveComponent") set(node_plugins "${node_plugins}composition::AdaptiveComponent;$\n")