2024-10-29 09:48:53 +01:00
|
|
|
set(VCPKG_BUILD_TYPE release) # header-only
|
2020-10-30 20:47:16 +01:00
|
|
|
|
2024-10-29 09:48:53 +01:00
|
|
|
string(REPLACE "." "-" ref "asio-${VERSION}")
|
2018-11-21 02:19:09 +03:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO chriskohlhoff/asio
|
2024-10-29 09:48:53 +01:00
|
|
|
REF "${ref}"
|
|
|
|
SHA512 9374ff97bd4af7b5b41754970b2bcb468f450fee46a80c9c3344f732c64091f2ac5a73ebf4ac1831c623793c08a3c109ae90b601273c40d062bfd4f026f1d94d
|
2018-11-21 02:19:09 +03:00
|
|
|
HEAD_REF master
|
2016-10-03 19:03:45 -05:00
|
|
|
)
|
2024-10-29 09:48:53 +01:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
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
|
|
|
|
2021-09-03 04:27:36 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2024-10-29 09:48:53 +01:00
|
|
|
OPTIONS
|
|
|
|
-DPACKAGE_VERSION=${VERSION}
|
2019-06-05 01:01:27 +02:00
|
|
|
)
|
2021-09-03 04:27:36 +08:00
|
|
|
vcpkg_cmake_install()
|
2024-10-29 09:48:53 +01:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
2021-09-03 04:27:36 +08:00
|
|
|
vcpkg_cmake_config_fixup()
|
2024-10-29 09:48:53 +01:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/asio-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2019-06-05 01:01:27 +02:00
|
|
|
|
2024-04-25 10:52:19 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/asio/LICENSE_1_0.txt")
|