mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 17:20:37 +08:00
31 lines
1.1 KiB
CMake
31 lines
1.1 KiB
CMake
#header-only library
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO chriskohlhoff/asio
|
|
REF asio-1-28-0
|
|
SHA512 0d635c40a28b6427e2cb6b9c89ab53dba7d3a237df2279148ca05fa899d6f8039a131929230e5ca1dbc7477be784e3da9a6cb68456cbf194178510621556e467
|
|
HEAD_REF master
|
|
PATCHES fix_coro_compile_error_msvc.patch #upstream PR: https://github.com/chriskohlhoff/asio/pull/1313
|
|
)
|
|
|
|
# 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)
|