vcpkg/ports/asio/portfile.cmake
JonLiu1993 2d8e2a8a47
[asio] update to 1.19.2 (#19846)
* [asio] update to 1.19.2

* update version
2021-09-02 13:27:36 -07:00

30 lines
1008 B
CMake

#header-only library
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO chriskohlhoff/asio
REF asio-1-19-2
SHA512 a6d1c5534fef0fe5ac549e1bd20919d180fbfe4c146be40ec6ebfa862534b8551778b0e79a5ba822ed645535e010646909f02f9e1d1f385ed758f07f57351ea8
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)