early-access version 2853
This commit is contained in:
11
externals/vcpkg/ports/czmq/Findlibcurl.cmake
vendored
Executable file
11
externals/vcpkg/ports/czmq/Findlibcurl.cmake
vendored
Executable file
@@ -0,0 +1,11 @@
|
||||
find_package(CURL CONFIG QUIET)
|
||||
|
||||
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()
|
||||
32
externals/vcpkg/ports/czmq/Findlibmicrohttpd.cmake
vendored
Executable file
32
externals/vcpkg/ports/czmq/Findlibmicrohttpd.cmake
vendored
Executable file
@@ -0,0 +1,32 @@
|
||||
find_path(LIBMICROHTTPD_INCLUDE_DIR NAMES microhttpd.h)
|
||||
|
||||
get_filename_component(_prefix_path ${LIBMICROHTTPD_INCLUDE_DIR} PATH)
|
||||
|
||||
find_library(
|
||||
LIBMICROHTTPD_LIBRARY_DEBUG
|
||||
NAMES libmicrohttpd-dll_d libmicrohttpd microhttpd
|
||||
PATHS ${_prefix_path}/debug/lib
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
find_library(
|
||||
LIBMICROHTTPD_LIBRARY_RELEASE
|
||||
NAMES libmicrohttpd-dll libmicrohttpd microhttpd
|
||||
PATHS ${_prefix_path}/lib
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
unset(_prefix_path)
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(LIBMICROHTTPD)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
LIBMICROHTTPD
|
||||
REQUIRED_VARS LIBMICROHTTPD_LIBRARY LIBMICROHTTPD_INCLUDE_DIR
|
||||
)
|
||||
|
||||
if(LIBMICROHTTPD_FOUND)
|
||||
set(LIBMICROHTTPD_INCLUDE_DIRS ${LIBMICROHTTPD_INCLUDE_DIR})
|
||||
endif()
|
||||
6
externals/vcpkg/ports/czmq/Findlibzmq.cmake
vendored
Executable file
6
externals/vcpkg/ports/czmq/Findlibzmq.cmake
vendored
Executable file
@@ -0,0 +1,6 @@
|
||||
find_package(ZeroMQ CONFIG REQUIRED)
|
||||
|
||||
set(LIBZMQ_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIR})
|
||||
set(LIBZMQ_LIBRARIES libzmq libzmq-static)
|
||||
set(LIBZMQ_FOUND TRUE)
|
||||
message(STATUS "Found libzmq: ${LIBZMQ_LIBRARIES}")
|
||||
17
externals/vcpkg/ports/czmq/Findlz4.cmake
vendored
Executable file
17
externals/vcpkg/ports/czmq/Findlz4.cmake
vendored
Executable file
@@ -0,0 +1,17 @@
|
||||
find_path(LZ4_INCLUDE_DIR NAMES lz4.h)
|
||||
|
||||
find_library(LZ4_LIBRARY_DEBUG NAMES lz4d)
|
||||
find_library(LZ4_LIBRARY_RELEASE NAMES lz4)
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(LZ4)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
LZ4
|
||||
REQUIRED_VARS LZ4_LIBRARY LZ4_INCLUDE_DIR
|
||||
)
|
||||
|
||||
if(LZ4_FOUND)
|
||||
set(LZ4_INCLUDE_DIRS ${LZ4_INCLUDE_DIR})
|
||||
endif()
|
||||
35
externals/vcpkg/ports/czmq/Finduuid.cmake
vendored
Executable file
35
externals/vcpkg/ports/czmq/Finduuid.cmake
vendored
Executable file
@@ -0,0 +1,35 @@
|
||||
find_path(
|
||||
UUID_INCLUDE_DIR
|
||||
NAMES uuid/uuid.h
|
||||
)
|
||||
|
||||
get_filename_component(_prefix_path ${UUID_INCLUDE_DIR} PATH)
|
||||
|
||||
find_library(
|
||||
UUID_LIBRARY_DEBUG
|
||||
NAMES uuid
|
||||
PATHS ${_prefix_path}/debug/lib
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
find_library(
|
||||
UUID_LIBRARY_RELEASE
|
||||
NAMES uuid
|
||||
PATHS ${_prefix_path}/lib
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
unset(_prefix_path)
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(UUID)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
UUID
|
||||
REQUIRED_VARS UUID_LIBRARY UUID_INCLUDE_DIR
|
||||
)
|
||||
|
||||
if(UUID_FOUND)
|
||||
set(UUID_INCLUDE_DIRS ${UUID_INCLUDE_DIR})
|
||||
endif()
|
||||
17
externals/vcpkg/ports/czmq/fix-dependencies.patch
vendored
Executable file
17
externals/vcpkg/ports/czmq/fix-dependencies.patch
vendored
Executable file
@@ -0,0 +1,17 @@
|
||||
diff --git a/builds/cmake/Config.cmake.in b/builds/cmake/Config.cmake.in
|
||||
index 9c15f36a..5afff016 100644
|
||||
--- a/builds/cmake/Config.cmake.in
|
||||
+++ b/builds/cmake/Config.cmake.in
|
||||
@@ -1,4 +1,12 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
+include(CMakeFindDependencyMacro)
|
||||
+
|
||||
+find_dependency(ZeroMQ)
|
||||
+
|
||||
+if ("@CZMQ_WITH_LIBCURL@" AND "@LIBCURL_FOUND@")
|
||||
+ find_dependency(CURL)
|
||||
+endif ()
|
||||
+
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
|
||||
check_required_components("@PROJECT_NAME@")
|
||||
87
externals/vcpkg/ports/czmq/portfile.cmake
vendored
Executable file
87
externals/vcpkg/ports/czmq/portfile.cmake
vendored
Executable file
@@ -0,0 +1,87 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO zeromq/czmq
|
||||
REF v4.2.1
|
||||
SHA512 65a21f7bd5935b119e1b24ce3b2ce8462031ab7c9a4ba587bb99fe618c9f8cb672cfa202993ddd79e0fb0f154ada06560b79a1b4f762fcce8f88f2f450ecee01
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-dependencies.patch
|
||||
)
|
||||
|
||||
foreach(_cmake_module
|
||||
Findlibcurl.cmake
|
||||
Findlibmicrohttpd.cmake
|
||||
Findlibzmq.cmake
|
||||
Findlz4.cmake
|
||||
Finduuid.cmake
|
||||
)
|
||||
file(COPY
|
||||
${CMAKE_CURRENT_LIST_DIR}/${_cmake_module}
|
||||
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
|
||||
FEATURES
|
||||
draft ENABLE_DRAFTS
|
||||
curl CZMQ_WITH_LIBCURL
|
||||
httpd CZMQ_WITH_LIBMICROHTTPD
|
||||
lz4 CZMQ_WITH_LZ4
|
||||
uuid CZMQ_WITH_UUID
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
DISABLE_PARALLEL_CONFIGURE
|
||||
OPTIONS
|
||||
-DCZMQ_BUILD_SHARED=${BUILD_SHARED}
|
||||
-DCZMQ_BUILD_STATIC=${BUILD_STATIC}
|
||||
-DBUILD_TESTING=OFF
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH CMake)
|
||||
endif()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/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}"
|
||||
)
|
||||
|
||||
if ("tool" IN_LIST FEATURES)
|
||||
vcpkg_copy_tools(TOOL_NAMES zmakecert)
|
||||
endif()
|
||||
|
||||
vcpkg_clean_executables_in_bin(FILE_NAMES zmakecert)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
# Remove headers with "common" names that conflict with other packages which aren't intended to be installed
|
||||
# See https://github.com/zeromq/czmq/issues/2197
|
||||
foreach(FILE readme.txt sha1.h sha1.inc_c slre.h slre.inc_c zgossip_engine.inc zgossip_msg.h zhash_primes.inc zsock_option.inc)
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/include/${FILE}")
|
||||
endforeach()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/czmq_library.h
|
||||
"if defined CZMQ_STATIC"
|
||||
"if 1 //if defined CZMQ_STATIC"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
9
externals/vcpkg/ports/czmq/vcpkg-cmake-wrapper.cmake
vendored
Executable file
9
externals/vcpkg/ports/czmq/vcpkg-cmake-wrapper.cmake
vendored
Executable file
@@ -0,0 +1,9 @@
|
||||
_find_package(${ARGS})
|
||||
|
||||
if(TARGET czmq AND NOT TARGET czmq-static)
|
||||
add_library(czmq-static INTERFACE IMPORTED)
|
||||
set_target_properties(czmq-static PROPERTIES INTERFACE_LINK_LIBRARIES czmq)
|
||||
elseif(TARGET czmq-static AND NOT TARGET czmq)
|
||||
add_library(czmq INTERFACE IMPORTED)
|
||||
set_target_properties(czmq PROPERTIES INTERFACE_LINK_LIBRARIES czmq-static)
|
||||
endif()
|
||||
54
externals/vcpkg/ports/czmq/vcpkg.json
vendored
Executable file
54
externals/vcpkg/ports/czmq/vcpkg.json
vendored
Executable file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"name": "czmq",
|
||||
"version-semver": "4.2.1",
|
||||
"port-version": 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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user