2016-10-26 11:49:01 -07:00
|
|
|
#header-only library
|
2020-10-30 20:47:16 +01:00
|
|
|
|
2018-11-21 02:19:09 +03:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO chriskohlhoff/asio
|
2021-10-18 14:32:53 -07:00
|
|
|
REF asio-1-20-0
|
|
|
|
SHA512 dc2def1f2b93866100b5d645f77c4a231fe3feae457010abf4e659df76b08b46870d608cf792a2f82e1b28c69c320055862647fb29aa0677a58d6141d58e76b2
|
2018-11-21 02:19:09 +03:00
|
|
|
HEAD_REF master
|
2016-10-03 19:03:45 -05:00
|
|
|
)
|
|
|
|
|
2019-06-28 13:50:32 -07:00
|
|
|
# Always use "ASIO_STANDALONE" to avoid boost dependency
|
2020-10-30 20:47:16 +01:00
|
|
|
vcpkg_replace_string("${SOURCE_PATH}/asio/include/asio/detail/config.hpp" "defined(ASIO_STANDALONE)" "!defined(VCPKG_DISABLE_ASIO_STANDALONE)")
|
2019-06-28 13:50:32 -07:00
|
|
|
|
2019-06-05 01:01:27 +02:00
|
|
|
# CMake install
|
2021-09-03 04:27:36 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-06-05 01:01:27 +02:00
|
|
|
)
|
2021-09-03 04:27:36 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-06-05 01:01:27 +02:00
|
|
|
|
2021-09-03 04:27:36 +08:00
|
|
|
vcpkg_cmake_config_fixup()
|
2019-06-05 01:01:27 +02:00
|
|
|
file(INSTALL
|
2021-09-03 04:27:36 +08:00
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/asio-config.cmake"
|
|
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
|
2019-06-05 01:01:27 +02:00
|
|
|
)
|
2021-09-03 04:27:36 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
|
2019-06-05 01:01:27 +02:00
|
|
|
|
2016-10-03 19:03:45 -05:00
|
|
|
# Handle copyright
|
2021-09-03 04:27:36 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/asio/LICENSE_1_0.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|