vcpkg/ports/asio/portfile.cmake

30 lines
1008 B
CMake
Raw Normal View History

2016-10-27 02:49:01 +08:00
#header-only library
2018-11-21 07:19:09 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO chriskohlhoff/asio
REF asio-1-22-1
SHA512 7658293f2be1f5ea659a424614b2f3092954df45802fbb0031b7983d11762f4f68d18eab076e14954df3a24ce89ff26bd4bebea88b9a3dc680387252efec8398
2018-11-21 07:19:09 +08:00
HEAD_REF master
2016-10-04 08:03:45 +08:00
)
2019-06-29 04:50:32 +08:00
# 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)")
2019-06-29 04:50:32 +08:00
# 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")
2016-10-04 08:03:45 +08:00
# Handle copyright
file(INSTALL "${SOURCE_PATH}/asio/LICENSE_1_0.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)