mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-19 04:43:02 +08:00
[tcp-pubsub] Add new port (#28649)
* Add port tcp-pubsub * Patch package config file
This commit is contained in:
parent
e9e1c40c76
commit
ae5dd51153
13
ports/tcp-pubsub/fix-package-config-file.patch
Normal file
13
ports/tcp-pubsub/fix-package-config-file.patch
Normal file
@ -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")
|
29
ports/tcp-pubsub/portfile.cmake
Normal file
29
ports/tcp-pubsub/portfile.cmake
Normal file
@ -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")
|
50
ports/tcp-pubsub/use-ports-for-asio-and-recycle.patch
Normal file
50
ports/tcp-pubsub/use-ports-for-asio-and-recycle.patch
Normal file
@ -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
|
||||
)
|
||||
-
|
20
ports/tcp-pubsub/vcpkg.json
Normal file
20
ports/tcp-pubsub/vcpkg.json
Normal file
@ -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
|
||||
}
|
||||
]
|
||||
}
|
@ -7432,6 +7432,10 @@
|
||||
"baseline": "1.2.5",
|
||||
"port-version": 0
|
||||
},
|
||||
"tcp-pubsub": {
|
||||
"baseline": "1.0.3",
|
||||
"port-version": 0
|
||||
},
|
||||
"teemo": {
|
||||
"baseline": "2.7",
|
||||
"port-version": 0
|
||||
|
9
versions/t-/tcp-pubsub.json
Normal file
9
versions/t-/tcp-pubsub.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "075f0da2c8e03d545d28b625ecadde2a58135382",
|
||||
"version": "1.0.3",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user