vcpkg/ports/asio/portfile.cmake
Jia Yue Hua 7195f9e3f5
[asio] update to 1.29.0 (#36229)
* [asio] update to 1.29.0

* [asio] update to 1.29.0
2024-01-19 11:58:10 -08:00

30 lines
1008 B
CMake

#header-only library
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO chriskohlhoff/asio
REF asio-1-29-0
SHA512 f8df39c5a5e89dcfe4bd37c7e757e44e3e94d9b79d7ab08d1804ad8980993a607070f7e12238ffe3286840cd08c0b3c8e3639d3a1177e5ff795994cbc42a8292
HEAD_REF master
)
# Always use "ASIO_STANDALONE" to avoid boost dependency
vcpkg_replace_string("${SOURCE_PATH}/asio/include/asio/detail/config.hpp" "defined(ASIO_STANDALONE)" "!defined(VCPKG_DISABLE_ASIO_STANDALONE)")
# CMake install
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
file(INSTALL
"${CMAKE_CURRENT_LIST_DIR}/asio-config.cmake"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
# Handle copyright
file(INSTALL "${SOURCE_PATH}/asio/LICENSE_1_0.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)