vcpkg/ports/asio/portfile.cmake

22 lines
937 B
CMake
Raw Normal View History

2016-10-27 02:49:01 +08:00
#header-only library
include(vcpkg_common_functions)
2017-12-30 06:22:14 +08:00
2018-11-21 07:19:09 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO chriskohlhoff/asio
2019-01-10 01:52:58 +08:00
REF asio-1-12-2
SHA512 7c2e213ff154bb2e5776b37906d437a62206f973316c94706e6d42e3c2f0866e7d97f3e40225ab5f28bf2c4a33fa0b38a4b75421aef86ddf9f2da0811caa2d00
2018-11-21 07:19:09 +08:00
HEAD_REF master
2016-10-04 08:03:45 +08:00
)
# Handle copyright
2018-11-21 07:19:09 +08:00
file(INSTALL ${SOURCE_PATH}/asio/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
2016-10-04 08:03:45 +08:00
# Copy the asio header files
2018-11-21 07:19:09 +08:00
file(INSTALL ${SOURCE_PATH}/asio/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp" PATTERN "*.ipp")
# Always use "ASIO_STANDALONE" to avoid boost dependency
file(READ "${CURRENT_PACKAGES_DIR}/include/asio/detail/config.hpp" _contents)
string(REPLACE "defined(ASIO_STANDALONE)" "!defined(VCPKG_DISABLE_ASIO_STANDALONE)" _contents "${_contents}")
file(WRITE "${CURRENT_PACKAGES_DIR}/include/asio/detail/config.hpp" "${_contents}")