diff --git a/ports/cyclonedds/enable-security.patch b/ports/cyclonedds/enable-security.patch new file mode 100644 index 0000000000..a414272986 --- /dev/null +++ b/ports/cyclonedds/enable-security.patch @@ -0,0 +1,13 @@ +diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt +index 148fb3f2..c9c4d96c 100644 +--- a/src/core/CMakeLists.txt ++++ b/src/core/CMakeLists.txt +@@ -43,7 +43,7 @@ endif() + + # Support the OMG DDS Security within ddsc adds quite a bit of code. + if(ENABLE_SECURITY) +- target_link_libraries(ddsc PRIVATE security_core) ++ target_link_libraries(ddsc PRIVATE $) + target_include_directories( + ddsc PUBLIC + $>) diff --git a/ports/cyclonedds/portfile.cmake b/ports/cyclonedds/portfile.cmake new file mode 100644 index 0000000000..bafd4f2448 --- /dev/null +++ b/ports/cyclonedds/portfile.cmake @@ -0,0 +1,50 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO eclipse-cyclonedds/cyclonedds + REF "${VERSION}" + SHA512 2cc8668a5d42b4391edfee7310c868bc6a5cd0e96f478c270cc19cf9aeb86f057f43753c2c27f79912a5eca478404526bb9c7041e60669f7cf5a7fa931bf1d89 + HEAD_REF master + PATCHES + enable-security.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "ddsperf" BUILD_DDSPERF + "deadline-missed" ENABLE_DEADLINE_MISSED + "ipv6" ENABLE_IPV6 + "idlc" BUILD_IDLC + "lifespan" ENABLE_LIFESPAN + "security" ENABLE_SECURITY + "shm" ENABLE_SHM + "source-specific-multicast" ENABLE_SOURCE_SPECIFIC_MULTICAST + "ssl" ENABLE_SSL + "topic-discovery" ENABLE_TOPIC_DISCOVERY + "type-discovery" ENABLE_TYPE_DISCOVERY +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/CycloneDDS") + +if(BUILD_IDLC) + vcpkg_copy_tools(TOOL_NAMES idlc AUTO_CLEAN) +endif() + +if(BUILD_DDSPERF) + vcpkg_copy_tools(TOOL_NAMES ddsperf AUTO_CLEAN) +endif() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" +) + +vcpkg_fixup_pkgconfig() +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/cyclonedds/usage b/ports/cyclonedds/usage new file mode 100644 index 0000000000..dcc8c83136 --- /dev/null +++ b/ports/cyclonedds/usage @@ -0,0 +1,4 @@ +cyclonedds provides CMake targets: + + find_package(CycloneDDS CONFIG REQUIRED) + target_link_libraries(main PRIVATE CycloneDDS::ddsc) diff --git a/ports/cyclonedds/vcpkg.json b/ports/cyclonedds/vcpkg.json new file mode 100644 index 0000000000..01fb742d35 --- /dev/null +++ b/ports/cyclonedds/vcpkg.json @@ -0,0 +1,88 @@ +{ + "name": "cyclonedds", + "version-semver": "0.10.2", + "description": "Eclipse Cyclone DDS is a very performant and robust open-source implementation of the OMG DDS specification", + "homepage": "https://cyclonedds.io", + "license": "EPL-2.0 OR BSD-3-Clause", + "supports": "!uwp & !(arm64 & windows)", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "deadline-missed", + "ipv6", + "lifespan", + "security", + "source-specific-multicast", + "topic-discovery", + "type-discovery" + ], + "features": { + "ddsperf": { + "description": "Build ddsperf tool", + "dependencies": [ + { + "name": "cyclonedds", + "host": true, + "default-features": false, + "features": [ + "idlc" + ] + } + ] + }, + "deadline-missed": { + "description": "Enable Deadline Missed QoS suppor" + }, + "idlc": { + "description": "Build IDL preprocessor" + }, + "ipv6": { + "description": "Enable ipv6 support" + }, + "lifespan": { + "description": "Enable Lifespan QoS support" + }, + "security": { + "description": "Enable OMG DDS Security support" + }, + "shm": { + "description": "Enable shared memory support", + "supports": "!windows", + "dependencies": [ + "iceoryx" + ] + }, + "source-specific-multicast": { + "description": "Enable support for source-specific multicast" + }, + "ssl": { + "description": "Enable OpenSSL support", + "dependencies": [ + "openssl" + ] + }, + "topic-discovery": { + "description": "Enable Topic Discovery support", + "dependencies": [ + { + "name": "cyclonedds", + "default-features": false, + "features": [ + "type-discovery" + ] + } + ] + }, + "type-discovery": { + "description": "Enable Type Discovery support" + } + } +} diff --git a/versions/baseline.json b/versions/baseline.json index b2a5c34562..99b3538f4d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1876,6 +1876,10 @@ "baseline": "3.0.0", "port-version": 0 }, + "cyclonedds": { + "baseline": "0.10.2", + "port-version": 0 + }, "czmq": { "baseline": "4.2.1", "port-version": 1 diff --git a/versions/c-/cyclonedds.json b/versions/c-/cyclonedds.json new file mode 100644 index 0000000000..3840a1325f --- /dev/null +++ b/versions/c-/cyclonedds.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "8432327df58b39777e3debd3310817ec2752dd87", + "version-semver": "0.10.2", + "port-version": 0 + } + ] +}