aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/tcp-pubsub
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/tcp-pubsub
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/tcp-pubsub')
-rw-r--r--vcpkg/ports/tcp-pubsub/fix-package-config-file.patch13
-rw-r--r--vcpkg/ports/tcp-pubsub/portfile.cmake29
-rw-r--r--vcpkg/ports/tcp-pubsub/use-ports-for-asio-and-recycle.patch50
-rw-r--r--vcpkg/ports/tcp-pubsub/vcpkg.json20
4 files changed, 112 insertions, 0 deletions
diff --git a/vcpkg/ports/tcp-pubsub/fix-package-config-file.patch b/vcpkg/ports/tcp-pubsub/fix-package-config-file.patch
new file mode 100644
index 0000000..e3e786f
--- /dev/null
+++ b/vcpkg/ports/tcp-pubsub/fix-package-config-file.patch
@@ -0,0 +1,13 @@
+diff --git a/tcp_pubsub/cmake/tcp_pubsubConfig.cmake.in b/tcp_pubsub/cmake/tcp_pubsubConfig.cmake.in
+index e4dd17a..553b0b1 100644
+--- a/tcp_pubsub/cmake/tcp_pubsubConfig.cmake.in
++++ b/tcp_pubsub/cmake/tcp_pubsubConfig.cmake.in
+@@ -1,4 +1,6 @@
+ @PACKAGE_INIT@
+
+-INCLUDE("@PACKAGE_TCP_PUBSUB_INSTALL_CMAKE_DIR@/tcp_pubsubTargets.cmake")
+-find_package(Threads)
++include(CMakeFindDependencyMacro)
++find_dependency(Threads)
++
++include("${CMAKE_CURRENT_LIST_DIR}/tcp_pubsubTargets.cmake")
diff --git a/vcpkg/ports/tcp-pubsub/portfile.cmake b/vcpkg/ports/tcp-pubsub/portfile.cmake
new file mode 100644
index 0000000..b3119a4
--- /dev/null
+++ b/vcpkg/ports/tcp-pubsub/portfile.cmake
@@ -0,0 +1,29 @@
+vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO eclipse-ecal/tcp_pubsub
+ REF "v${VERSION}"
+ SHA512 f89b9d9cdbd8e5787ac8923ec65cc2fc259e7d12269b1466a4c29657d8d466e39b95ec8b8483e975bf393f71b5c2d8f59cfd3d955e4e72d69716ec59fe0429af
+ PATCHES
+ "fix-package-config-file.patch"
+ "use-ports-for-asio-and-recycle.patch"
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DTCP_PUBSUB_BUILD_SAMPLES=OFF
+ -DTCP_PUBSUB_BUILD_ECAL_SAMPLES=OFF
+)
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(
+ PACKAGE_NAME tcp_pubsub
+ CONFIG_PATH lib/cmake/tcp_pubsub
+)
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
diff --git a/vcpkg/ports/tcp-pubsub/use-ports-for-asio-and-recycle.patch b/vcpkg/ports/tcp-pubsub/use-ports-for-asio-and-recycle.patch
new file mode 100644
index 0000000..f7ecc69
--- /dev/null
+++ b/vcpkg/ports/tcp-pubsub/use-ports-for-asio-and-recycle.patch
@@ -0,0 +1,50 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cdf73fa..9fea965 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -30,9 +30,6 @@ set(CMAKE_RELWITHDEBINFO_POSTFIX reldbg)
+ # Add main tcp_pubsub library
+ add_subdirectory(tcp_pubsub)
+
+-# Recycle dependency. It's header only and not in the API, so we add it with EXCLUDE_FOR_ALL, so it won't be installed
+-add_subdirectory(thirdparty/recycle EXCLUDE_FROM_ALL)
+-
+ # Generic samples
+ if (TCP_PUBSUB_BUILD_SAMPLES)
+ add_subdirectory(samples/performance_publisher)
+diff --git a/tcp_pubsub/CMakeLists.txt b/tcp_pubsub/CMakeLists.txt
+index d2a5777..772319a 100644
+--- a/tcp_pubsub/CMakeLists.txt
++++ b/tcp_pubsub/CMakeLists.txt
+@@ -10,8 +10,8 @@ set(CMAKE_CXX_VISIBILITY_PRESET hidden)
+ set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
+
+ find_package(Threads REQUIRED)
+-find_package(asio REQUIRED)
+-find_package(recycle REQUIRED)
++find_package(asio CONFIG REQUIRED)
++find_path(RECYCLE_INCLUDE_DIRS "recycle/no_locking_policy.hpp")
+
+ # Include GenerateExportHeader that will create export macros for us
+ include(GenerateExportHeader)
+@@ -73,7 +73,6 @@ target_link_libraries(${PROJECT_NAME}
+ # Link header-only libs (asio & recycle) as described in this workaround:
+ # https://gitlab.kitware.com/cmake/cmake/-/issues/15415#note_633938
+ $<BUILD_INTERFACE:asio::asio>
+- $<BUILD_INTERFACE:steinwurf::recycle>
+ )
+
+ target_compile_definitions(${PROJECT_NAME}
+@@ -100,6 +99,7 @@ target_include_directories(${PROJECT_NAME}
+ $<INSTALL_INTERFACE:include>
+ PRIVATE
+ src/
++ ${RECYCLE_INCLUDE_DIRS}
+ )
+
+ set_target_properties(${PROJECT_NAME} PROPERTIES
+@@ -177,4 +177,3 @@ install(
+ DESTINATION ${TCP_PUBSUB_INSTALL_CMAKE_DIR}
+ COMPONENT tcp_pubsub_dev
+ )
+-
diff --git a/vcpkg/ports/tcp-pubsub/vcpkg.json b/vcpkg/ports/tcp-pubsub/vcpkg.json
new file mode 100644
index 0000000..dbac6ff
--- /dev/null
+++ b/vcpkg/ports/tcp-pubsub/vcpkg.json
@@ -0,0 +1,20 @@
+{
+ "name": "tcp-pubsub",
+ "version": "1.0.3",
+ "description": "TCP based publish-subscribe library for C++",
+ "homepage": "https://github.com/eclipse-ecal/tcp_pubsub",
+ "license": "MIT",
+ "supports": "!uwp",
+ "dependencies": [
+ "asio",
+ "recycle",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}