early-access version 2853
This commit is contained in:
55
externals/vcpkg/ports/nng/portfile.cmake
vendored
Executable file
55
externals/vcpkg/ports/nng/portfile.cmake
vendored
Executable file
@@ -0,0 +1,55 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO nanomsg/nng
|
||||
REF v1.5.2
|
||||
SHA512 33cda9e0422c6e8cb56e48bd812f381bf07a92a0aa2fbadddbca7cfde585c66299142186a3a76a97163e5570042452a62c1e53180ebfbf016a44eee998b16286
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_check_features(
|
||||
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
mbedtls NNG_ENABLE_TLS
|
||||
tools NNG_ENABLE_NNGCAT
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DNNG_TESTS=OFF
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/nng)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
vcpkg_replace_string(
|
||||
"${CURRENT_PACKAGES_DIR}/include/nng/nng.h"
|
||||
"defined(NNG_SHARED_LIB)"
|
||||
"0 /* defined(NNG_SHARED_LIB) */"
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
vcpkg_replace_string(
|
||||
"${CURRENT_PACKAGES_DIR}/include/nng/nng.h"
|
||||
"!defined(NNG_STATIC_LIB)"
|
||||
"1 /* !defined(NNG_STATIC_LIB) */"
|
||||
)
|
||||
else()
|
||||
vcpkg_replace_string(
|
||||
"${CURRENT_PACKAGES_DIR}/include/nng/nng.h"
|
||||
"!defined(NNG_STATIC_LIB)"
|
||||
"0 /* !defined(NNG_STATIC_LIB) */"
|
||||
)
|
||||
endif()
|
||||
|
||||
if ("tools" IN_LIST FEATURES)
|
||||
vcpkg_copy_tools(TOOL_NAMES nngcat AUTO_CLEAN)
|
||||
endif()
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
28
externals/vcpkg/ports/nng/vcpkg.json
vendored
Executable file
28
externals/vcpkg/ports/nng/vcpkg.json
vendored
Executable file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "nng",
|
||||
"version-semver": "1.5.2",
|
||||
"description": "nanomsg-next-gen, lightweight messaging library",
|
||||
"homepage": "https://nng.nanomsg.org",
|
||||
"license": "MIT",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"mbedtls": {
|
||||
"description": "nng TLS support",
|
||||
"dependencies": [
|
||||
"mbedtls"
|
||||
]
|
||||
},
|
||||
"tools": {
|
||||
"description": "nng tools (nngcat, for example)"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user