From 1c82413c8a0cc290e19d5b24cbb6db4e49d3c713 Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Tue, 3 Dec 2024 18:14:02 +0800 Subject: [PATCH 1/2] Use unique name for exported targets Signed-off-by: Luca Della Vedova --- rmf_fleet_adapter/CMakeLists.txt | 4 ++-- rmf_task_ros2/CMakeLists.txt | 4 ++-- rmf_traffic_ros2/CMakeLists.txt | 4 ++-- rmf_websocket/CMakeLists.txt | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rmf_fleet_adapter/CMakeLists.txt b/rmf_fleet_adapter/CMakeLists.txt index 6c2f0dfb..9ea61000 100644 --- a/rmf_fleet_adapter/CMakeLists.txt +++ b/rmf_fleet_adapter/CMakeLists.txt @@ -517,7 +517,7 @@ rmf_api_generate_schema_headers( # ----------------------------------------------------------------------------- -ament_export_targets(rmf_fleet_adapter HAS_LIBRARY_TARGET) +ament_export_targets(export_rmf_fleet_adapter HAS_LIBRARY_TARGET) ament_export_dependencies(${dep_pkgs}) install( @@ -538,7 +538,7 @@ install( close_lanes interrupt_robot robot_state_aggregator_main - EXPORT rmf_fleet_adapter + EXPORT export_rmf_fleet_adapter RUNTIME DESTINATION lib/rmf_fleet_adapter LIBRARY DESTINATION lib ARCHIVE DESTINATION lib diff --git a/rmf_task_ros2/CMakeLists.txt b/rmf_task_ros2/CMakeLists.txt index 4f9574cf..af4db3e8 100644 --- a/rmf_task_ros2/CMakeLists.txt +++ b/rmf_task_ros2/CMakeLists.txt @@ -51,7 +51,7 @@ target_include_directories(rmf_task_ros2 ${rclcpp_INCLUDE_DIRS} ) -ament_export_targets(rmf_task_ros2 HAS_LIBRARY_TARGET) +ament_export_targets(export_rmf_task_ros2 HAS_LIBRARY_TARGET) ament_export_dependencies(rmf_traffic rmf_task_msgs rclcpp nlohmann_json) #=============================================================================== @@ -114,7 +114,7 @@ install( install( TARGETS rmf_task_ros2 - EXPORT rmf_task_ros2 + EXPORT export_rmf_task_ros2 RUNTIME DESTINATION lib/rmf_task_ros2 LIBRARY DESTINATION lib ARCHIVE DESTINATION lib diff --git a/rmf_traffic_ros2/CMakeLists.txt b/rmf_traffic_ros2/CMakeLists.txt index 25f86c9e..9bfd3b56 100644 --- a/rmf_traffic_ros2/CMakeLists.txt +++ b/rmf_traffic_ros2/CMakeLists.txt @@ -204,7 +204,7 @@ target_include_directories(rmf_traffic_ros2 ${rclcpp_INCLUDE_DIRS} ) -ament_export_targets(rmf_traffic_ros2 HAS_LIBRARY_TARGET) +ament_export_targets(export_rmf_traffic_ros2 HAS_LIBRARY_TARGET) ament_export_dependencies( rclcpp rmf_traffic @@ -278,7 +278,7 @@ install( install( TARGETS rmf_traffic_ros2 - EXPORT rmf_traffic_ros2 + EXPORT export_rmf_traffic_ros2 RUNTIME DESTINATION lib/rmf_traffic_ros2 LIBRARY DESTINATION lib ARCHIVE DESTINATION lib diff --git a/rmf_websocket/CMakeLists.txt b/rmf_websocket/CMakeLists.txt index 6c6745a2..0368593d 100644 --- a/rmf_websocket/CMakeLists.txt +++ b/rmf_websocket/CMakeLists.txt @@ -71,7 +71,7 @@ target_include_directories(example_client ) -ament_export_targets(rmf_websocket HAS_LIBRARY_TARGET) +ament_export_targets(export_rmf_websocket HAS_LIBRARY_TARGET) ament_export_dependencies(rmf_traffic rclcpp nlohmann_json websocketpp) #=============================================================================== @@ -82,7 +82,7 @@ install( install( TARGETS rmf_websocket - EXPORT rmf_websocket + EXPORT export_rmf_websocket RUNTIME DESTINATION lib/rmf_websocket LIBRARY DESTINATION lib ARCHIVE DESTINATION lib From 14b16a5ac38c7dea2ac902843b6a88ea6433f839 Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Tue, 3 Dec 2024 18:32:20 +0800 Subject: [PATCH 2/2] Split binary and library install Signed-off-by: Luca Della Vedova --- rmf_fleet_adapter/CMakeLists.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/rmf_fleet_adapter/CMakeLists.txt b/rmf_fleet_adapter/CMakeLists.txt index 9ea61000..ac476544 100644 --- a/rmf_fleet_adapter/CMakeLists.txt +++ b/rmf_fleet_adapter/CMakeLists.txt @@ -520,9 +520,19 @@ rmf_api_generate_schema_headers( ament_export_targets(export_rmf_fleet_adapter HAS_LIBRARY_TARGET) ament_export_dependencies(${dep_pkgs}) +# Install the libraries install( TARGETS rmf_fleet_adapter + EXPORT export_rmf_fleet_adapter + RUNTIME DESTINATION lib/rmf_fleet_adapter + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +# Install the binaries +install( + TARGETS read_only read_only_blockade mock_traffic_light @@ -538,10 +548,7 @@ install( close_lanes interrupt_robot robot_state_aggregator_main - EXPORT export_rmf_fleet_adapter - RUNTIME DESTINATION lib/rmf_fleet_adapter - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib + DESTINATION lib/rmf_fleet_adapter ) # -----------------------------------------------------------------------------