2018-08-29 21:01:06 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO nanomsg/nng
|
2021-02-09 05:34:35 +08:00
|
|
|
REF d020adda8f0348d094790618703b8341a26007a3 # version 1.4.0
|
|
|
|
SHA512 dbbbee25ddbfece77336b9be9e63ae331b2991cb94a7a71141faf519f02aa1f123f72f89b98964e24ebc5ced786034b6dac60d8ef905376b6fb5fb7dbff49bd6
|
2018-08-29 21:01:06 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2020-09-25 03:25:36 +08:00
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2020-04-24 12:43:37 +08:00
|
|
|
mbedtls NNG_ENABLE_TLS
|
2020-09-25 03:25:36 +08:00
|
|
|
tools NNG_ENABLE_NNGCAT
|
2020-04-24 12:43:37 +08:00
|
|
|
)
|
2018-08-31 18:18:10 +08:00
|
|
|
|
2018-08-29 21:01:06 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
2020-09-25 03:25:36 +08:00
|
|
|
OPTIONS
|
2018-08-29 21:01:06 +08:00
|
|
|
-DNNG_TESTS=OFF
|
2020-09-25 03:25:36 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2018-08-29 21:01:06 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
2018-11-17 09:42:31 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nng)
|
2018-08-29 21:01:06 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
|
2019-03-05 02:23:14 +08:00
|
|
|
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()
|
|
|
|
|
2020-09-25 03:25:36 +08:00
|
|
|
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)
|
2018-08-29 21:01:06 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|