Skip to content

Commit

Permalink
Use unique name for exported targets and avoid exporting binary targe…
Browse files Browse the repository at this point in the history
…ts (#396)

* Use unique name for exported targets

Signed-off-by: Luca Della Vedova <[email protected]>

* Split binary and library install

Signed-off-by: Luca Della Vedova <[email protected]>

---------

Signed-off-by: Luca Della Vedova <[email protected]>
  • Loading branch information
luca-della-vedova authored Dec 18, 2024
1 parent 9ea5a5b commit bee9778
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
17 changes: 12 additions & 5 deletions rmf_fleet_adapter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -517,12 +517,22 @@ 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 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
Expand All @@ -538,10 +548,7 @@ install(
close_lanes
interrupt_robot
robot_state_aggregator_main
EXPORT rmf_fleet_adapter
RUNTIME DESTINATION lib/rmf_fleet_adapter
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
DESTINATION lib/rmf_fleet_adapter
)

# -----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions rmf_task_ros2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

#===============================================================================
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions rmf_traffic_ros2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions rmf_websocket/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

#===============================================================================
Expand All @@ -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
Expand Down

0 comments on commit bee9778

Please sign in to comment.