2017-09-09 08:32:19 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO zeromq/libzmq
|
2024-01-18 03:49:29 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 108d9c5fa761c111585c30f9c651ed92942dda0ac661155bca52cc7b6dbeb3d27b0dd994abde206eacfc3bc88d19ed24e45b291050c38469e34dca5f8c9a037d
|
2022-01-28 00:08:27 +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
|
2024-01-20 04:31:22 +08:00
|
|
|
sodium WITH_LIBSODIUM
|
|
|
|
draft ENABLE_DRAFTS
|
|
|
|
websockets ENABLE_WS
|
2023-03-30 07:36:08 +08:00
|
|
|
websockets-secure WITH_TLS
|
2024-01-20 04:31:22 +08:00
|
|
|
curve ENABLE_CURVE
|
2019-08-14 11:13:55 +08:00
|
|
|
)
|
2019-03-08 08:43:12 +08:00
|
|
|
|
2022-06-24 06:07:17 +08:00
|
|
|
set(PLATFORM_OPTIONS "")
|
2020-09-10 03:01:49 +08:00
|
|
|
if(VCPKG_TARGET_IS_MINGW)
|
2024-01-20 04:31:22 +08:00
|
|
|
list(APPEND PLATFORM_OPTIONS "-DCMAKE_SYSTEM_VERSION=6.0" "-DZMQ_HAVE_IPC=0")
|
2020-09-10 03:01:49 +08:00
|
|
|
endif()
|
|
|
|
|
2024-08-10 17:20:23 +08:00
|
|
|
vcpkg_find_acquire_program(PKGCONFIG)
|
|
|
|
|
2021-07-27 02:07:10 +08:00
|
|
|
vcpkg_cmake_configure(
|
2022-01-28 00:08:27 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2017-09-09 08:32:19 +08:00
|
|
|
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
|
2023-04-28 06:05:34 +08:00
|
|
|
-DWITH_LIBBSD=OFF
|
2023-04-28 03:15:15 +08:00
|
|
|
-DCMAKE_REQUIRE_FIND_PACKAGE_GnuTLS=ON
|
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}
|
2024-08-10 17:20:23 +08:00
|
|
|
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
|
2017-09-09 08:32:19 +08:00
|
|
|
OPTIONS_DEBUG
|
|
|
|
"-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg"
|
2022-06-24 06:07:17 +08:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
2023-06-27 11:28:25 +08:00
|
|
|
CMAKE_REQUIRE_FIND_PACKAGE_GnuTLS
|
|
|
|
WITH_LIBBSD
|
2024-01-20 04:31:22 +08:00
|
|
|
WITH_PERF_TOOL
|
2023-06-27 11:28:25 +08:00
|
|
|
WITH_TLS
|
2017-09-09 08:32:19 +08:00
|
|
|
)
|
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
|
2023-06-27 11:28:25 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
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")
|
2021-10-28 06:19:28 +08:00
|
|
|
|
|
|
|
vcpkg_fixup_pkgconfig()
|