vcpkg/ports/cppzmq/portfile.cmake

18 lines
896 B
CMake
Raw Normal View History

2016-11-02 02:14:24 +08:00
#header-only library
2016-11-01 16:32:25 +08:00
include(vcpkg_common_functions)
2017-04-23 21:23:25 +08:00
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cppzmq-4.2.1)
2016-11-01 16:32:25 +08:00
vcpkg_download_distfile(ARCHIVE
2017-04-23 21:23:25 +08:00
URLS "https://github.com/zeromq/cppzmq/archive/v4.2.1.zip"
FILENAME "cppzmq-4.2.1.zip"
SHA512 ee75ce4bd28ecb5ef660d1ed6f5522654eced6ded8745dc0c61df351f4ff0ff8980d1bd848b2649fcce4aa539a457e56e55b0a59cb49f44b0a29875d0ea28dce
2016-11-01 16:32:25 +08:00
)
vcpkg_extract_source_archive(${ARCHIVE})
# cppzmq is a single header library, so we just need to copy that file in the include directory
file(INSTALL ${SOURCE_PATH}/zmq.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include)
2017-04-23 21:23:25 +08:00
file(INSTALL ${SOURCE_PATH}/zmq_addon.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include)
2016-11-01 16:32:25 +08:00
# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppzmq)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppzmq/LICENSE ${CURRENT_PACKAGES_DIR}/share/cppzmq/copyright)