vcpkg/ports/cpr/portfile.cmake

34 lines
962 B
CMake
Raw Normal View History

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
2017-06-20 07:59:25 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO whoshuu/cpr
REF 41fbaca90160950f1397e0ffc6b58bd81063f131 # v1.5.2
SHA512 0c493eef3069c1067f2492e6bc91e20b415a03a9392cbe70d4fb40f64a71b601ec62a9bcf5ca7e5b5a6e74449904f3121503421f4653f5b55df6702121806977
HEAD_REF master
PATCHES
001-cpr-config.patch
2017-06-20 07:59:25 +08:00
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
2017-06-20 07:59:25 +08:00
OPTIONS
-DBUILD_CPR_TESTS=OFF
-DUSE_SYSTEM_CURL=ON
OPTIONS_DEBUG
-DDISABLE_INSTALL_HEADERS=ON
2017-06-20 07:59:25 +08:00
)
vcpkg_install_cmake()
2017-06-20 07:59:25 +08:00
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/cprConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/lib/cmake/cpr)
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cpr)
vcpkg_copy_pdbs()
2017-06-20 07:59:25 +08:00
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
2017-06-20 07:59:25 +08:00
# Handle copyright
2020-10-14 06:02:41 +08:00
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)