2021-07-27 02:07:10 +08:00
|
|
|
vcpkg_fail_port_install(ON_TARGET "UWP")
|
|
|
|
|
2017-09-09 08:32:19 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO zeromq/libzmq
|
2021-05-01 01:57:53 +08:00
|
|
|
REF v4.3.4
|
|
|
|
SHA512 ad828b1ab5a87983285a6b44b08240816ed1c4e2c73306ab1a851bf80df1892b5e2f92064a49fbadc1f4c75043625ace77dd25b64d5d1c2a7d1d61cc916fba0b
|
2021-07-27 02:07:10 +08:00
|
|
|
PATCHES fix-arm.patch
|
2017-09-09 08:32:19 +08:00
|
|
|
)
|
2016-10-25 18:27:21 +08:00
|
|
|
|
2017-09-09 08:32:19 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
|
|
|
|
|
2019-09-21 10:10:14 +08:00
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
sodium WITH_LIBSODIUM
|
2020-11-21 03:54:45 +08:00
|
|
|
draft ENABLE_DRAFTS
|
2021-07-27 02:07:10 +08:00
|
|
|
websockets-sha1 ENABLE_WS
|
2019-08-14 11:13:55 +08:00
|
|
|
)
|
2019-03-08 08:43:12 +08:00
|
|
|
|
2020-09-10 03:01:49 +08:00
|
|
|
set(PLATFORM_OPTIONS)
|
|
|
|
if(VCPKG_TARGET_IS_MINGW)
|
|
|
|
set(PLATFORM_OPTIONS "-DCMAKE_SYSTEM_VERSION=6.0")
|
|
|
|
endif()
|
|
|
|
|
2021-07-27 02:07:10 +08:00
|
|
|
vcpkg_cmake_configure(
|
2017-09-09 08:32:19 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
OPTIONS
|
|
|
|
-DZMQ_BUILD_TESTS=OFF
|
|
|
|
-DBUILD_STATIC=${BUILD_STATIC}
|
|
|
|
-DBUILD_SHARED=${BUILD_SHARED}
|
|
|
|
-DWITH_PERF_TOOL=OFF
|
2019-09-21 10:10:14 +08:00
|
|
|
-DWITH_DOCS=OFF
|
|
|
|
-DWITH_NSS=OFF
|
2021-05-01 01:57:53 +08:00
|
|
|
-DWITH_LIBSODIUM_STATIC=${BUILD_STATIC}
|
2019-08-14 11:13:55 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2020-09-10 03:01:49 +08:00
|
|
|
${PLATFORM_OPTIONS}
|
2017-09-09 08:32:19 +08:00
|
|
|
OPTIONS_DEBUG
|
|
|
|
"-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg"
|
|
|
|
)
|
2016-10-25 05:42:16 +08:00
|
|
|
|
2021-07-27 02:07:10 +08:00
|
|
|
vcpkg_cmake_install()
|
2016-10-25 05:42:16 +08:00
|
|
|
|
2017-09-09 08:32:19 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2016-10-24 00:32:12 +08:00
|
|
|
|
2021-07-27 02:07:10 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH CMake)
|
|
|
|
else()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/ZeroMQ)
|
2018-03-22 03:27:29 +08:00
|
|
|
endif()
|
2016-10-24 00:32:12 +08:00
|
|
|
|
2019-07-10 03:49:38 +08:00
|
|
|
file(COPY
|
2021-07-27 02:07:10 +08:00
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake"
|
|
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
|
2019-07-10 03:49:38 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
2021-07-27 02:07:10 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
2018-01-04 11:52:14 +08:00
|
|
|
endif()
|
|
|
|
|
2016-10-24 00:32:12 +08:00
|
|
|
# Handle copyright
|
2021-07-27 02:07:10 +08:00
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/share/zmq/COPYING.LESSER.txt" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright")
|
2016-10-24 00:32:12 +08:00
|
|
|
|
2021-07-27 02:07:10 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/share/zmq")
|