mirror of https://github.com/microsoft/vcpkg.git
[wirestead] add port (#52984)
This commit is contained in:
parent
42ee70e43e
commit
0c15af8c66
|
|
@ -1,44 +1,8 @@
|
|||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO jwsung91/unilink
|
||||
REF v${VERSION}
|
||||
SHA512 9bab9e551955caf916349c554aea91fa64c75c8928bbf89947b9e47f162698373318aff42deefdb4169f8e47d794014317c5108e7416747b38f1e60fd01a75e0
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
|
||||
message(WARNING
|
||||
"jwsung91-unilink has been renamed to wirestead and no longer builds "
|
||||
"anything itself. It now only depends on wirestead so that installing "
|
||||
"it does not conflict with wirestead's own files. Update your "
|
||||
"dependencies to use \"wirestead\" directly."
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" UNILINK_BUILD_SHARED)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DUNILINK_BUILD_SHARED=${UNILINK_BUILD_SHARED}
|
||||
-DUNILINK_BUILD_TESTS=OFF
|
||||
-DUNILINK_BUILD_EXAMPLES=OFF
|
||||
-DUNILINK_BUILD_DOCS=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_cmake_config_fixup(
|
||||
PACKAGE_NAME unilink
|
||||
CONFIG_PATH "lib/cmake/unilink"
|
||||
)
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
foreach(_pc_file IN ITEMS
|
||||
"${CURRENT_PACKAGES_DIR}/lib/pkgconfig/unilink.pc"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/unilink.pc")
|
||||
if(EXISTS "${_pc_file}")
|
||||
file(READ "${_pc_file}" _unilink_pc_contents)
|
||||
string(REGEX REPLACE "([ \\t]+)-lboost_system" "\\1" _unilink_pc_contents "${_unilink_pc_contents}")
|
||||
string(REPLACE "-lboost_system" "" _unilink_pc_contents "${_unilink_pc_contents}")
|
||||
file(WRITE "${_pc_file}" "${_unilink_pc_contents}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
|
|
|||
|
|
@ -1,22 +1,11 @@
|
|||
{
|
||||
"name": "jwsung91-unilink",
|
||||
"version": "0.8.8",
|
||||
"description": "Unified, cross-platform async C++ library for Serial, TCP, UDP, and UDS",
|
||||
"homepage": "https://github.com/jwsung91/unilink",
|
||||
"version": "0.9.0",
|
||||
"description": "Deprecated alias for wirestead. unilink was renamed to Wirestead; this port installs nothing itself and only depends on wirestead to avoid conflicting with its installed files.",
|
||||
"homepage": "https://github.com/wirestead/wirestead",
|
||||
"license": "Apache-2.0",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
"boost-asio",
|
||||
"boost-system",
|
||||
"boost-thread",
|
||||
"spdlog",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
"wirestead"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,59 @@
|
|||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO wirestead/wirestead
|
||||
REF v${VERSION}
|
||||
SHA512 dd6d67fbeb665cd9c3477e1e96ecf173691143e892c196b0286609fd7d605b402e84e8c68beb6bd8357ea0e54d874b8a28aae8ebb8390814615c28c0abb6f017
|
||||
HEAD_REF main
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" WIRESTEAD_BUILD_SHARED)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" WIRESTEAD_BUILD_STATIC)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DWIRESTEAD_BUILD_SHARED=${WIRESTEAD_BUILD_SHARED}
|
||||
-DWIRESTEAD_BUILD_STATIC=${WIRESTEAD_BUILD_STATIC}
|
||||
-DWIRESTEAD_BUILD_TESTS=OFF
|
||||
-DWIRESTEAD_BUILD_DOCS=OFF
|
||||
-DWIRESTEAD_ENABLE_INSTALL=ON
|
||||
-DWIRESTEAD_ENABLE_PKGCONFIG=ON
|
||||
-DWIRESTEAD_ENABLE_EXPORT_HEADER=ON
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_cmake_config_fixup(
|
||||
PACKAGE_NAME wirestead
|
||||
CONFIG_PATH "lib/cmake/wirestead"
|
||||
DO_NOT_DELETE_PARENT_CONFIG_PATH
|
||||
)
|
||||
|
||||
vcpkg_cmake_config_fixup(
|
||||
PACKAGE_NAME unilink
|
||||
CONFIG_PATH "lib/cmake/unilink"
|
||||
)
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
foreach(_pc_file IN ITEMS
|
||||
"${CURRENT_PACKAGES_DIR}/lib/pkgconfig/wirestead.pc"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/wirestead.pc"
|
||||
"${CURRENT_PACKAGES_DIR}/lib/pkgconfig/unilink.pc"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/unilink.pc")
|
||||
if(EXISTS "${_pc_file}")
|
||||
file(READ "${_pc_file}" _wirestead_pc_contents)
|
||||
string(REGEX REPLACE "([ \t]+)-lboost_system" "\\1" _wirestead_pc_contents "${_wirestead_pc_contents}")
|
||||
string(REPLACE "-lboost_system" "" _wirestead_pc_contents "${_wirestead_pc_contents}")
|
||||
file(WRITE "${_pc_file}" "${_wirestead_pc_contents}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
wirestead provides CMake targets:
|
||||
|
||||
find_package(wirestead CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE wirestead::wirestead)
|
||||
|
||||
The legacy UniLink compatibility package is also installed for v0.9.x source
|
||||
compatibility:
|
||||
|
||||
find_package(unilink CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE unilink::unilink)
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "wirestead",
|
||||
"version": "0.9.0",
|
||||
"description": "Unified, cross-platform async C++ library for Serial, TCP, UDP, and UDS",
|
||||
"homepage": "https://github.com/wirestead/wirestead",
|
||||
"license": "Apache-2.0",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
"boost-asio",
|
||||
"boost-system",
|
||||
"spdlog",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -4253,7 +4253,7 @@
|
|||
"port-version": 0
|
||||
},
|
||||
"jwsung91-unilink": {
|
||||
"baseline": "0.8.8",
|
||||
"baseline": "0.9.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"jwt-cpp": {
|
||||
|
|
@ -10996,6 +10996,10 @@
|
|||
"baseline": "1.3.2",
|
||||
"port-version": 0
|
||||
},
|
||||
"wirestead": {
|
||||
"baseline": "0.9.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"wmipp": {
|
||||
"baseline": "1.3.0",
|
||||
"port-version": 0
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "dda77c343602cdf50263310fb56ddbed55306f79",
|
||||
"version": "0.9.0",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "cf620c818ac72767bda1abb183312a20560995d9",
|
||||
"version": "0.8.8",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "7ab402c1b97b7063133bf8dfdd000802cdf72eb2",
|
||||
"version": "0.9.0",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue