From 83a26f2d1911bbb61c786f445b3f4477e20e969b Mon Sep 17 00:00:00 2001 From: yuanyuyuan Date: Thu, 29 Aug 2024 22:00:14 +0800 Subject: [PATCH 1/2] build: deprecate the zenohc_debug and incldue the zenohc dependency in the zenoh_c_vendor --- rmw_zenoh_cpp/CMakeLists.txt | 4 ---- zenoh_c_vendor/CMakeLists.txt | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/rmw_zenoh_cpp/CMakeLists.txt b/rmw_zenoh_cpp/CMakeLists.txt index 4ecfe360..a8674797 100644 --- a/rmw_zenoh_cpp/CMakeLists.txt +++ b/rmw_zenoh_cpp/CMakeLists.txt @@ -22,10 +22,6 @@ find_package(rosidl_typesupport_fastrtps_c REQUIRED) find_package(rosidl_typesupport_fastrtps_cpp REQUIRED) find_package(rmw REQUIRED) find_package(zenoh_c_vendor REQUIRED) -find_package(zenohc_debug QUIET) -if(NOT zenohc_debug_FOUND) - find_package(zenohc REQUIRED) -endif() add_library(rmw_zenoh_cpp SHARED src/detail/attachment_helpers.cpp diff --git a/zenoh_c_vendor/CMakeLists.txt b/zenoh_c_vendor/CMakeLists.txt index f1870337..8f819c1f 100644 --- a/zenoh_c_vendor/CMakeLists.txt +++ b/zenoh_c_vendor/CMakeLists.txt @@ -31,4 +31,6 @@ ament_vendor(zenoh_c_vendor "-DZENOHC_CUSTOM_TARGET=${ZENOHC_CUSTOM_TARGET}" ) +ament_export_dependencies(zenohc) + ament_package() From b6bd22600087c0c077ae06fcc42c51a10559cb31 Mon Sep 17 00:00:00 2001 From: yuanyuyuan Date: Thu, 29 Aug 2024 22:31:18 +0800 Subject: [PATCH 2/2] build!: build rmw_zenoh_cpp with zenoh-cpp --- rmw_zenoh_cpp/CMakeLists.txt | 4 +++- rmw_zenoh_cpp/package.xml | 4 ++-- rmw_zenoh_cpp/src/rmw_init.cpp | 2 +- {zenoh_c_vendor => zenoh_cpp_vendor}/CMakeLists.txt | 13 ++++++++++++- {zenoh_c_vendor => zenoh_cpp_vendor}/package.xml | 2 +- 5 files changed, 19 insertions(+), 6 deletions(-) rename {zenoh_c_vendor => zenoh_cpp_vendor}/CMakeLists.txt (85%) rename {zenoh_c_vendor => zenoh_cpp_vendor}/package.xml (95%) diff --git a/rmw_zenoh_cpp/CMakeLists.txt b/rmw_zenoh_cpp/CMakeLists.txt index a8674797..23e53a59 100644 --- a/rmw_zenoh_cpp/CMakeLists.txt +++ b/rmw_zenoh_cpp/CMakeLists.txt @@ -21,7 +21,7 @@ find_package(rcutils REQUIRED) find_package(rosidl_typesupport_fastrtps_c REQUIRED) find_package(rosidl_typesupport_fastrtps_cpp REQUIRED) find_package(rmw REQUIRED) -find_package(zenoh_c_vendor REQUIRED) +find_package(zenoh_cpp_vendor REQUIRED) add_library(rmw_zenoh_cpp SHARED src/detail/attachment_helpers.cpp @@ -62,6 +62,7 @@ target_link_libraries(rmw_zenoh_cpp rosidl_typesupport_fastrtps_cpp::rosidl_typesupport_fastrtps_cpp rmw::rmw zenohc::lib + zenohcxx::zenohc ) configure_rmw_library(rmw_zenoh_cpp) @@ -123,6 +124,7 @@ target_link_libraries(rmw_zenohd rcpputils::rcpputils rmw::rmw zenohc::lib + zenohcxx::zenohc ) install( diff --git a/rmw_zenoh_cpp/package.xml b/rmw_zenoh_cpp/package.xml index 3da4920d..d51e82a5 100644 --- a/rmw_zenoh_cpp/package.xml +++ b/rmw_zenoh_cpp/package.xml @@ -14,8 +14,8 @@ ament_cmake - zenoh_c_vendor - zenoh_c_vendor + zenoh_cpp_vendor + zenoh_cpp_vendor ament_index_cpp fastcdr diff --git a/rmw_zenoh_cpp/src/rmw_init.cpp b/rmw_zenoh_cpp/src/rmw_init.cpp index 7526b7a7..892c983a 100644 --- a/rmw_zenoh_cpp/src/rmw_init.cpp +++ b/rmw_zenoh_cpp/src/rmw_init.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/zenoh_c_vendor/CMakeLists.txt b/zenoh_cpp_vendor/CMakeLists.txt similarity index 85% rename from zenoh_c_vendor/CMakeLists.txt rename to zenoh_cpp_vendor/CMakeLists.txt index 8f819c1f..1821dfa6 100644 --- a/zenoh_c_vendor/CMakeLists.txt +++ b/zenoh_cpp_vendor/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.16) -project(zenoh_c_vendor) +project(zenoh_cpp_vendor) # Default to C++17 if(NOT CMAKE_CXX_STANDARD) @@ -33,4 +33,15 @@ ament_vendor(zenoh_c_vendor ament_export_dependencies(zenohc) +ament_vendor(zenoh_cpp_vendor + VCS_URL https://github.com/eclipse-zenoh/zenoh-cpp + VCS_VERSION dev/1.0.0 + CMAKE_ARGS + -DZENOHCXX_ZENOHC=OFF +) + +externalproject_add_stepdependencies(zenoh_cpp_vendor configure zenoh_c_vendor) + +ament_export_dependencies(zenohcxx) + ament_package() diff --git a/zenoh_c_vendor/package.xml b/zenoh_cpp_vendor/package.xml similarity index 95% rename from zenoh_c_vendor/package.xml rename to zenoh_cpp_vendor/package.xml index b907feff..eb2c8c20 100644 --- a/zenoh_c_vendor/package.xml +++ b/zenoh_cpp_vendor/package.xml @@ -1,7 +1,7 @@ - zenoh_c_vendor + zenoh_cpp_vendor 0.0.1 Vendor pkg to install zenoh-c Yadunund