From c6b756810311010f6bc84965ae4afaf6fbaf4941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Tue, 2 Apr 2024 09:45:51 +0200 Subject: [PATCH] Rename the republish_node to pc_republish_node. (#75) (#76) The major reason for this is that image_transport already has a republish_node, and when we are building for distribution we can't have two files named /opt/ros/rolling/lib/librepublish_node.so Rename this one to libpc_republish_node, which should remove the conflict. Signed-off-by: Chris Lalancette Co-authored-by: Chris Lalancette --- point_cloud_transport/CMakeLists.txt | 24 +++++++++---------- .../point_cloud_transport.hpp | 1 + 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/point_cloud_transport/CMakeLists.txt b/point_cloud_transport/CMakeLists.txt index c5c9fe2..00a84da 100644 --- a/point_cloud_transport/CMakeLists.txt +++ b/point_cloud_transport/CMakeLists.txt @@ -57,36 +57,34 @@ target_link_libraries(${PROJECT_NAME}_plugins PRIVATE ${PROJECT_NAME} pluginlib::pluginlib) -add_library(republish_node SHARED src/republish.cpp) -target_link_libraries(republish_node +add_library(pc_republish_node SHARED src/republish.cpp) +target_link_libraries(pc_republish_node PRIVATE ${PROJECT_NAME} + pluginlib::pluginlib + rclcpp_components::component + rclcpp::rclcpp ) -target_compile_definitions(republish_node PRIVATE "POINT_CLOUD_TRANSPORT_BUILDING_DLL") -ament_target_dependencies(republish_node - pluginlib - rclcpp_components - rclcpp -) -target_include_directories(republish_node PUBLIC +target_compile_definitions(pc_republish_node PRIVATE "POINT_CLOUD_TRANSPORT_BUILDING_DLL") +target_include_directories(pc_republish_node PRIVATE "$" "$") -rclcpp_components_register_nodes(republish_node "point_cloud_transport::Republisher") +rclcpp_components_register_nodes(pc_republish_node "point_cloud_transport::Republisher") -rclcpp_components_register_node(republish_node +rclcpp_components_register_node(pc_republish_node PLUGIN "point_cloud_transport::Republisher" EXECUTABLE republish ) # Build list_transports add_executable(list_transports src/list_transports.cpp) -target_link_libraries(list_transports +target_link_libraries(list_transports PRIVATE ${PROJECT_NAME} pluginlib::pluginlib) # Install plugin descriptions pluginlib_export_plugin_description_file(${PROJECT_NAME} default_plugins.xml) -install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_plugins republish_node +install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_plugins pc_republish_node ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin diff --git a/point_cloud_transport/include/point_cloud_transport/point_cloud_transport.hpp b/point_cloud_transport/include/point_cloud_transport/point_cloud_transport.hpp index d3150ab..4f01663 100644 --- a/point_cloud_transport/include/point_cloud_transport/point_cloud_transport.hpp +++ b/point_cloud_transport/include/point_cloud_transport/point_cloud_transport.hpp @@ -42,6 +42,7 @@ #include +#include #include #include #include