From edb445094a972834113453162704934dc910d8c5 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Mon, 18 Dec 2023 14:36:37 +0100 Subject: [PATCH 1/2] Fix file conflicts with YARP Before this commit, yarp-ros was overwriting some files that YARP also installed, in particular the yarpcar library and CMake component, and the yarp_idl_tools CMake components. This commit renames the yarpcar library to yarpcarros, and move the YARP::yarpidl_ros target to the rosmsgs YARP CMake component, avoiding any conflict. --- example/idl/rosPortable/CMakeLists.txt | 2 +- src/CMakeLists.txt | 11 ++--------- src/carriers/CMakeLists.txt | 20 ++++++++++---------- src/yarpidl_rosmsg/CMakeLists.txt | 4 ++-- 4 files changed, 15 insertions(+), 22 deletions(-) diff --git a/example/idl/rosPortable/CMakeLists.txt b/example/idl/rosPortable/CMakeLists.txt index 9b84996..3731250 100644 --- a/example/idl/rosPortable/CMakeLists.txt +++ b/example/idl/rosPortable/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16) -find_package(YARP COMPONENTS os idl_tools REQUIRED) +find_package(YARP COMPONENTS os idl_tools rosmsg REQUIRED) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 420b755..dfa11fe 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -11,13 +11,6 @@ add_subdirectory(libYARP_wire_rep_utils) add_subdirectory(carriers) if(YARP_COMPILE_EXECUTABLES) - # idl compilers (thrift and ros) + # ros idl compiler add_subdirectory(yarpidl_rosmsg) - if(NOT CREATE_SHARED_LIBS) - include(YarpInstallBasicPackageFiles) - yarp_install_basic_package_files( - YARP_idl_tools - INCLUDE_CONTENT "include(\"\\\${YARP_MODULE_DIR}/YarpIDL.cmake\")" - ) - endif() -endif() +endif() \ No newline at end of file diff --git a/src/carriers/CMakeLists.txt b/src/carriers/CMakeLists.txt index 977a452..ceba685 100644 --- a/src/carriers/CMakeLists.txt +++ b/src/carriers/CMakeLists.txt @@ -5,7 +5,7 @@ include(YarpPlugin) include(YarpPrintFeature) -yarp_begin_plugin_library(yarpcar +yarp_begin_plugin_library(yarpcarros OPTION YARP_COMPILE_CARRIER_PLUGINS DEFAULT ON ) @@ -13,22 +13,22 @@ yarp_begin_plugin_library(yarpcar add_subdirectory(xmlrpc_carrier) add_subdirectory(tcpros_carrier) -yarp_end_plugin_library(yarpcar QUIET) -add_library(YARP::yarpcar ALIAS yarpcar) +yarp_end_plugin_library(yarpcarros QUIET) +add_library(YARP::yarpcarros ALIAS yarpcarros) install( - TARGETS yarpcar - EXPORT YARP_yarpcar - COMPONENT yarpcar + TARGETS yarpcarros + EXPORT YARP_yarpcarros + COMPONENT yarpcarros RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ) include(YarpInstallBasicPackageFiles) -yarp_install_basic_package_files(YARP_yarpcar - DEPENDENCIES ${YARP_yarpcar_PUBLIC_DEPS} - PRIVATE_DEPENDENCIES ${YARP_yarpcar_PRIVATE_DEPS} +yarp_install_basic_package_files(YARP_yarpcarros + DEPENDENCIES ${YARP_yarpcarros_PUBLIC_DEPS} + PRIVATE_DEPENDENCIES ${YARP_yarpcarros_PRIVATE_DEPS} ) -set_property(TARGET yarpcar PROPERTY FOLDER "Plugins/Carrier") +set_property(TARGET yarpcarros PROPERTY FOLDER "Plugins/Carrier") diff --git a/src/yarpidl_rosmsg/CMakeLists.txt b/src/yarpidl_rosmsg/CMakeLists.txt index a65ac56..addce20 100644 --- a/src/yarpidl_rosmsg/CMakeLists.txt +++ b/src/yarpidl_rosmsg/CMakeLists.txt @@ -40,8 +40,8 @@ endif() install( TARGETS yarpidl_rosmsg - EXPORT YARP_idl_tools - COMPONENT YARP_idl_tools + EXPORT YARP_rosmsg + COMPONENT YARP_rosmsg DESTINATION ${CMAKE_INSTALL_BINDIR} ) From a362b1540f7e00a604c42ceacac1bac4b21643ae Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Mon, 18 Dec 2023 14:57:15 +0100 Subject: [PATCH 2/2] Update CMakeLists.txt --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dfa11fe..7754fc6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -13,4 +13,4 @@ add_subdirectory(carriers) if(YARP_COMPILE_EXECUTABLES) # ros idl compiler add_subdirectory(yarpidl_rosmsg) -endif() \ No newline at end of file +endif()