2016-10-27 02:49:01 +08:00
|
|
|
#header-only library
|
2020-10-31 03:47:16 +08:00
|
|
|
|
2018-11-21 07:19:09 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO chriskohlhoff/asio
|
2021-07-01 22:29:42 +08:00
|
|
|
REF asio-1-18-2
|
|
|
|
SHA512 5a2312f1a14106e3109a9f02e8ac65a1d639b411834f0aa301767a4dd30d8384f6f1a94034b6016ef989c7d7880fd4c8de11c7be0cb58b4dc64a49ec335a7113
|
2018-11-21 07:19:09 +08:00
|
|
|
HEAD_REF master
|
2016-10-04 08:03:45 +08:00
|
|
|
)
|
|
|
|
|
2019-06-29 04:50:32 +08:00
|
|
|
# Always use "ASIO_STANDALONE" to avoid boost dependency
|
2020-10-31 03:47:16 +08:00
|
|
|
vcpkg_replace_string("${SOURCE_PATH}/asio/include/asio/detail/config.hpp" "defined(ASIO_STANDALONE)" "!defined(VCPKG_DISABLE_ASIO_STANDALONE)")
|
2019-06-29 04:50:32 +08:00
|
|
|
|
2019-06-05 07:01:27 +08:00
|
|
|
# CMake install
|
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH "share/asio")
|
|
|
|
file(INSTALL
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/asio-config.cmake
|
2020-10-31 03:47:16 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
|
2019-06-05 07:01:27 +08:00
|
|
|
)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
|
|
|
|
|
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)
|