2016-10-26 11:49:01 -07:00
|
|
|
#header-only library
|
2016-10-26 11:59:46 -07:00
|
|
|
include(vcpkg_common_functions)
|
2017-12-30 01:22:14 +03:00
|
|
|
|
2018-06-05 00:50:33 -07:00
|
|
|
vcpkg_download_distfile(
|
|
|
|
ARCHIVE_FILE
|
2018-08-10 13:57:53 +08:00
|
|
|
URLS "https://sourceforge.net/projects/asio/files/asio/1.12.1%20%28Stable%29/asio-1.12.1.zip/download"
|
2018-06-05 00:50:33 -07:00
|
|
|
FILENAME "asio-1.12.1.zip"
|
|
|
|
SHA512 f35a519cde88824f65bde095c19d69449d0779e75da9e9ebb6a04f4847802213e8730715756a21632c4d27722cd5568ff7878d656ac79165a8bdf8652fbc1bd8
|
2016-10-03 19:03:45 -05:00
|
|
|
)
|
|
|
|
|
2018-06-05 00:50:33 -07:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
${ARCHIVE_FILE}
|
|
|
|
)
|
|
|
|
|
|
|
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/asio-1.12.1)
|
|
|
|
|
2016-10-03 19:03:45 -05:00
|
|
|
# Handle copyright
|
2018-06-05 00:50:33 -07:00
|
|
|
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
2017-12-30 01:22:14 +03:00
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)
|
2016-10-03 19:03:45 -05:00
|
|
|
|
|
|
|
# Copy the asio header files
|
2018-06-05 00:50:33 -07:00
|
|
|
file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp" PATTERN "*.ipp")
|
2018-04-05 15:14:37 -07:00
|
|
|
|
|
|
|
# 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}")
|