mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 05:59:07 +08:00
[zeromq] Update to latest master to take advantage of CMake improvements.
This commit is contained in:
parent
f52106a03a
commit
5a920ef760
@ -1,3 +1,3 @@
|
||||
Source: zeromq
|
||||
Version: 4.2.2
|
||||
Version: 20170908-18498f620f0f6d4076981ea16eb5760fe4d28dc2
|
||||
Description: The ZeroMQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products
|
||||
|
@ -1,75 +1,44 @@
|
||||
set(ZEROMQ_VERSION 4.2.2)
|
||||
set(ZEROMQ_HASH 4069813374d4e8d4c0f8debbe85472d0bd24cf644fb1bce748920eadffb81c429d28f523ef424df84fcaa7082b984fab8da57192802585811d37cff066f4e40c)
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libzmq-${ZEROMQ_VERSION})
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/zeromq/libzmq/archive/v${ZEROMQ_VERSION}.tar.gz"
|
||||
FILENAME "libzmq-${ZEROMQ_VERSION}.tar.gz"
|
||||
SHA512 ${ZEROMQ_HASH}
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
# Map from triplet "x86" to "win32" as used in the vcxproj file.
|
||||
if (TRIPLET_SYSTEM_ARCH MATCHES "x86")
|
||||
set(MSBUILD_PLATFORM "Win32")
|
||||
else ()
|
||||
set(MSBUILD_PLATFORM ${TRIPLET_SYSTEM_ARCH})
|
||||
endif()
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO zeromq/libzmq
|
||||
REF 18498f620f0f6d4076981ea16eb5760fe4d28dc2
|
||||
SHA512 0c4a5c72455411f47283da3cad381600101be19a62437ad8e2c38e5f18fb6d621a3136e402c6eb9ba153f3d6333da9902335c2dacd8405094d4d1269df28d4af
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
if(VCPKG_PLATFORM_TOOLSET MATCHES "v141")
|
||||
set(MSVS_VERSION 2017)
|
||||
else()
|
||||
set(MSVS_VERSION 2015)
|
||||
endif()
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES ${ARCHIVE}
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
vcpkg_build_msbuild(
|
||||
PROJECT_PATH ${SOURCE_PATH}/builds/msvc/vs${MSVS_VERSION}/libzmq/libzmq.vcxproj
|
||||
RELEASE_CONFIGURATION ReleaseDLL
|
||||
DEBUG_CONFIGURATION DebugDLL
|
||||
)
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/bin/${MSBUILD_PLATFORM}/Debug/${VCPKG_PLATFORM_TOOLSET}/dynamic/libzmq.dll
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
|
||||
)
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/bin/${MSBUILD_PLATFORM}/Release/${VCPKG_PLATFORM_TOOLSET}/dynamic/libzmq.dll
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/bin
|
||||
)
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/bin/${MSBUILD_PLATFORM}/Debug/${VCPKG_PLATFORM_TOOLSET}/dynamic/libzmq.lib
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
|
||||
)
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/bin/${MSBUILD_PLATFORM}/Release/${VCPKG_PLATFORM_TOOLSET}/dynamic/libzmq.lib
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
|
||||
|
||||
set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} \"-I${SOURCE_PATH}/builds/msvc\"")
|
||||
set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} \"-I${SOURCE_PATH}/builds/msvc\"")
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DZMQ_BUILD_TESTS=OFF
|
||||
-DPOLLER=select
|
||||
-DBUILD_STATIC=${BUILD_STATIC}
|
||||
-DBUILD_SHARED=${BUILD_SHARED}
|
||||
-DWITH_PERF_TOOL=OFF
|
||||
OPTIONS_DEBUG
|
||||
"-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg"
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
else()
|
||||
vcpkg_build_msbuild(
|
||||
PROJECT_PATH ${SOURCE_PATH}/builds/msvc/vs${MSVS_VERSION}/libzmq/libzmq.vcxproj
|
||||
RELEASE_CONFIGURATION ReleaseLIB
|
||||
DEBUG_CONFIGURATION DebugLIB
|
||||
)
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/bin/${MSBUILD_PLATFORM}/Debug/${VCPKG_PLATFORM_TOOLSET}/static/libzmq.lib
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
|
||||
)
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/bin/${MSBUILD_PLATFORM}/Release/${VCPKG_PLATFORM_TOOLSET}/static/libzmq.lib
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/include/
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/include
|
||||
)
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/ZeroMQ)
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/zeromq)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/zeromq/COPYING ${CURRENT_PACKAGES_DIR}/share/zeromq/copyright)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/zmq/COPYING.LESSER.txt ${CURRENT_PACKAGES_DIR}/share/zeromq/copyright)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/zmq)
|
||||
|
Loading…
Reference in New Issue
Block a user