mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 14:59:24 +08:00
[czmq] Update to v4.2.1 (#17989)
* [czmq] Update to 4.2.1 * [czmq] vcpkg x-add-version czmq * [czmq] Quote paths * [czmq] Overwrite version * [czmq] Fix curl winldap linkage when built as static library * [czmq] Overwrite version * [czmq] Fix dependencies * [czmq] Overwrite version * [czmq] Modernize * [czmq] Overwrite version
This commit is contained in:
parent
04208f04da
commit
9624235c56
@ -1,27 +0,0 @@
|
||||
Source: czmq
|
||||
Version: 2019-06-10-4
|
||||
Build-Depends: zeromq
|
||||
Description: High-level C binding for ZeroMQ
|
||||
Homepage: https://github.com/zeromq/czmq
|
||||
|
||||
Feature: tool
|
||||
Description: Build and install czmq tools (zmakecert)
|
||||
|
||||
Feature: draft
|
||||
Description: Build and install draft APIs
|
||||
|
||||
Feature: curl
|
||||
Description: Build with libcurl
|
||||
Build-Depends: curl
|
||||
|
||||
Feature: lz4
|
||||
Description: Build with lz4
|
||||
Build-Depends: lz4
|
||||
|
||||
Feature: httpd
|
||||
Description: Build with HTTP server support (libmicrohttpd)
|
||||
Build-Depends: libmicrohttpd
|
||||
|
||||
Feature: uuid
|
||||
Description: Build with libuuid
|
||||
Build-Depends: libuuid (!windows&!uwp&!osx)
|
@ -1,51 +1,11 @@
|
||||
find_path(
|
||||
LIBCURL_INCLUDE_DIRS
|
||||
NAMES curl/curl.h
|
||||
)
|
||||
find_package(CURL CONFIG QUIET)
|
||||
|
||||
find_library(
|
||||
LIBCURL_LIBRARY_DEBUG
|
||||
NAMES libcurl-d_imp libcurl-d curl-d curl
|
||||
)
|
||||
|
||||
find_library(
|
||||
LIBCURL_LIBRARY_RELEASE
|
||||
NAMES libcurl_imp libcurl curl
|
||||
)
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(LIBCURL)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
LIBCURL
|
||||
REQUIRED_VARS LIBCURL_LIBRARIES LIBCURL_INCLUDE_DIRS
|
||||
)
|
||||
|
||||
# CURL dependencies
|
||||
# https://github.com/Microsoft/vcpkg/issues/4312
|
||||
# https://github.com/microsoft/vcpkg/commit/ee325d14276e7bd7961e94e58293b02d6e9e92da
|
||||
# https://github.com/microsoft/vcpkg/pull/6698
|
||||
if (LIBCURL_FOUND)
|
||||
find_package(OpenSSL QUIET)
|
||||
find_package(ZLIB QUIET)
|
||||
|
||||
if (OPENSSL_FOUND)
|
||||
list(APPEND LIBCURL_LIBRARIES
|
||||
OpenSSL::SSL
|
||||
OpenSSL::Crypto
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (ZLIB_FOUND)
|
||||
list(APPEND LIBCURL_LIBRARIES
|
||||
ZLIB::ZLIB
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (WIN32)
|
||||
list(APPEND LIBCURL_LIBRARIES
|
||||
Crypt32
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
if(CURL_FOUND)
|
||||
set(LIBCURL_INCLUDE_DIRS ${CURL_INCLUDE_DIRS})
|
||||
set(LIBCURL_LIBRARIES CURL::libcurl)
|
||||
set(LIBCURL_FOUND TRUE)
|
||||
message(STATUS "Found libcurl: ${LIBCURL_LIBRARIES}")
|
||||
else()
|
||||
set(LIBCURL_FOUND FALSE)
|
||||
message(STATUS "Could not find libcurl")
|
||||
endif()
|
||||
|
@ -1,17 +1,17 @@
|
||||
find_path(LIBMICROHTTPD_INCLUDE_DIRS NAMES microhttpd.h)
|
||||
find_path(LIBMICROHTTPD_INCLUDE_DIR NAMES microhttpd.h)
|
||||
|
||||
get_filename_component(_prefix_path ${LIBMICROHTTPD_INCLUDE_DIRS} PATH)
|
||||
get_filename_component(_prefix_path ${LIBMICROHTTPD_INCLUDE_DIR} PATH)
|
||||
|
||||
find_library(
|
||||
LIBMICROHTTPD_LIBRARY_DEBUG
|
||||
NAMES libmicrohttpd microhttpd
|
||||
NAMES libmicrohttpd-dll_d libmicrohttpd microhttpd
|
||||
PATHS ${_prefix_path}/debug/lib
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
find_library(
|
||||
LIBMICROHTTPD_LIBRARY_RELEASE
|
||||
NAMES libmicrohttpd microhttpd
|
||||
NAMES libmicrohttpd-dll libmicrohttpd microhttpd
|
||||
PATHS ${_prefix_path}/lib
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
@ -24,5 +24,9 @@ select_library_configurations(LIBMICROHTTPD)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
LIBMICROHTTPD
|
||||
REQUIRED_VARS LIBMICROHTTPD_LIBRARIES LIBMICROHTTPD_INCLUDE_DIRS
|
||||
REQUIRED_VARS LIBMICROHTTPD_LIBRARY LIBMICROHTTPD_INCLUDE_DIR
|
||||
)
|
||||
|
||||
if(LIBMICROHTTPD_FOUND)
|
||||
set(LIBMICROHTTPD_INCLUDE_DIRS ${LIBMICROHTTPD_INCLUDE_DIR})
|
||||
endif()
|
||||
|
@ -2,9 +2,5 @@ find_package(ZeroMQ CONFIG REQUIRED)
|
||||
|
||||
set(LIBZMQ_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIR})
|
||||
set(LIBZMQ_LIBRARIES libzmq libzmq-static)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
LIBZMQ
|
||||
REQUIRED_VARS LIBZMQ_LIBRARIES LIBZMQ_INCLUDE_DIRS
|
||||
)
|
||||
set(LIBZMQ_FOUND TRUE)
|
||||
message(STATUS "Found libzmq: ${LIBZMQ_LIBRARIES}")
|
||||
|
@ -1,4 +1,4 @@
|
||||
find_path(LZ4_INCLUDE_DIRS NAMES lz4.h)
|
||||
find_path(LZ4_INCLUDE_DIR NAMES lz4.h)
|
||||
|
||||
find_library(LZ4_LIBRARY_DEBUG NAMES lz4d)
|
||||
find_library(LZ4_LIBRARY_RELEASE NAMES lz4)
|
||||
@ -9,5 +9,9 @@ select_library_configurations(LZ4)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
LZ4
|
||||
REQUIRED_VARS LZ4_LIBRARIES LZ4_INCLUDE_DIRS
|
||||
REQUIRED_VARS LZ4_LIBRARY LZ4_INCLUDE_DIR
|
||||
)
|
||||
|
||||
if(LZ4_FOUND)
|
||||
set(LZ4_INCLUDE_DIRS ${LZ4_INCLUDE_DIR})
|
||||
endif()
|
||||
|
@ -1,9 +1,9 @@
|
||||
find_path(
|
||||
UUID_INCLUDE_DIRS
|
||||
UUID_INCLUDE_DIR
|
||||
NAMES uuid/uuid.h
|
||||
)
|
||||
|
||||
get_filename_component(_prefix_path ${UUID_INCLUDE_DIRS} PATH)
|
||||
get_filename_component(_prefix_path ${UUID_INCLUDE_DIR} PATH)
|
||||
|
||||
find_library(
|
||||
UUID_LIBRARY_DEBUG
|
||||
@ -27,5 +27,9 @@ select_library_configurations(UUID)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
UUID
|
||||
REQUIRED_VARS UUID_LIBRARIES UUID_INCLUDE_DIRS
|
||||
REQUIRED_VARS UUID_LIBRARY UUID_INCLUDE_DIR
|
||||
)
|
||||
|
||||
if(UUID_FOUND)
|
||||
set(UUID_INCLUDE_DIRS ${UUID_INCLUDE_DIR})
|
||||
endif()
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git a/builds/cmake/Config.cmake.in b/builds/cmake/Config.cmake.in
|
||||
index 9c15f36a..e1475cd6 100644
|
||||
index 9c15f36a..5afff016 100644
|
||||
--- a/builds/cmake/Config.cmake.in
|
||||
+++ b/builds/cmake/Config.cmake.in
|
||||
@@ -1,4 +1,14 @@
|
||||
@@ -1,4 +1,12 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
+include(CMakeFindDependencyMacro)
|
||||
@ -10,10 +10,8 @@ index 9c15f36a..e1475cd6 100644
|
||||
+find_dependency(ZeroMQ)
|
||||
+
|
||||
+if ("@CZMQ_WITH_LIBCURL@" AND "@LIBCURL_FOUND@")
|
||||
+ find_dependency(OpenSSL)
|
||||
+ find_dependency(ZLIB)
|
||||
+ find_dependency(CURL)
|
||||
+endif ()
|
||||
+
|
||||
+
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
|
||||
check_required_components("@PROJECT_NAME@")
|
||||
|
@ -1,8 +1,8 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO zeromq/czmq
|
||||
REF 7e29cf95305551daad197e32423d9cff5f9b6893
|
||||
SHA512 7d79494c904f5276c9d1e4a193a63882dc622a6db8998b9719de4aec8b223b3a8b3c92ea02be81f39afc12c1a883b310fd3662ea27ed736b0b9c7092b4843a18
|
||||
REF v4.2.1
|
||||
SHA512 65a21f7bd5935b119e1b24ce3b2ce8462031ab7c9a4ba587bb99fe618c9f8cb672cfa202993ddd79e0fb0f154ada06560b79a1b4f762fcce8f88f2f450ecee01
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-dependencies.patch
|
||||
@ -15,27 +15,27 @@ foreach(_cmake_module
|
||||
Findlz4.cmake
|
||||
Finduuid.cmake
|
||||
)
|
||||
configure_file(
|
||||
file(COPY
|
||||
${CMAKE_CURRENT_LIST_DIR}/${_cmake_module}
|
||||
${SOURCE_PATH}/${_cmake_module}
|
||||
COPYONLY
|
||||
DESTINATION ${SOURCE_PATH}
|
||||
)
|
||||
endforeach()
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
draft ENABLE_DRAFTS
|
||||
curl CZMQ_WITH_LIBCURL
|
||||
httpd CZMQ_WITH_LIBMICROHTTPD
|
||||
lz4 CZMQ_WITH_LZ4
|
||||
uuid CZMQ_WITH_UUID
|
||||
vcpkg_check_features(
|
||||
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
draft ENABLE_DRAFTS
|
||||
curl CZMQ_WITH_LIBCURL
|
||||
httpd CZMQ_WITH_LIBMICROHTTPD
|
||||
lz4 CZMQ_WITH_LZ4
|
||||
uuid CZMQ_WITH_UUID
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
DISABLE_PARALLEL_CONFIGURE
|
||||
OPTIONS
|
||||
-DCZMQ_BUILD_SHARED=${BUILD_SHARED}
|
||||
@ -44,20 +44,22 @@ vcpkg_configure_cmake(
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake)
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH CMake)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH CMake)
|
||||
endif()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/share/cmake/${PORT})
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/${PORT})
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/${PORT})
|
||||
endif()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(COPY
|
||||
${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake"
|
||||
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
|
||||
)
|
||||
|
||||
if ("tool" IN_LIST FEATURES)
|
||||
@ -66,7 +68,7 @@ endif()
|
||||
|
||||
vcpkg_clean_executables_in_bin(FILE_NAMES zmakecert)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/czmq_library.h
|
||||
@ -76,4 +78,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
endif()
|
||||
|
||||
# Handle copyright
|
||||
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
53
ports/czmq/vcpkg.json
Normal file
53
ports/czmq/vcpkg.json
Normal file
@ -0,0 +1,53 @@
|
||||
{
|
||||
"name": "czmq",
|
||||
"version-semver": "4.2.1",
|
||||
"description": "High-level C binding for ZeroMQ",
|
||||
"homepage": "https://github.com/zeromq/czmq",
|
||||
"license": "MPL-2.0",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
},
|
||||
"zeromq"
|
||||
],
|
||||
"features": {
|
||||
"curl": {
|
||||
"description": "Build with libcurl",
|
||||
"dependencies": [
|
||||
"curl"
|
||||
]
|
||||
},
|
||||
"draft": {
|
||||
"description": "Build and install draft APIs"
|
||||
},
|
||||
"httpd": {
|
||||
"description": "Build with HTTP server support (libmicrohttpd)",
|
||||
"dependencies": [
|
||||
"libmicrohttpd"
|
||||
]
|
||||
},
|
||||
"lz4": {
|
||||
"description": "Build with lz4",
|
||||
"dependencies": [
|
||||
"lz4"
|
||||
]
|
||||
},
|
||||
"tool": {
|
||||
"description": "Build and install czmq tools (zmakecert)"
|
||||
},
|
||||
"uuid": {
|
||||
"description": "Build with libuuid",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "libuuid",
|
||||
"platform": "!windows & !uwp & !osx"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -1589,7 +1589,7 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"czmq": {
|
||||
"baseline": "2019-06-10-4",
|
||||
"baseline": "4.2.1",
|
||||
"port-version": 0
|
||||
},
|
||||
"d3dx12": {
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "e05dc72cf3b616b1fd6629ea3dc20d08ed8d8055",
|
||||
"version-semver": "4.2.1",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "31aceda22627ab6f97f03868d5f92a4cc78a275e",
|
||||
"version-string": "2019-06-10-4",
|
||||
|
Loading…
Reference in New Issue
Block a user