2019-03-21 18:15:37 +01:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2021-06-22 05:23:26 +08:00
|
|
|
if(VCPKG_TARGET_IS_UWP)
|
|
|
|
set(UWP_PATCH fix-uwp.patch)
|
|
|
|
endif()
|
|
|
|
|
2017-06-20 01:59:25 +02:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2021-10-18 14:21:39 -07:00
|
|
|
REPO libcpr/cpr
|
|
|
|
REF 1.6.2
|
|
|
|
SHA512 77afd1dc81274aa1d37bf17abaf2614b63802f17fc08bdf8453d96d8fa2bd4b025511db9fadbde51160d7dde31a0363694422d3407ca9cdac3cd79b744a82888
|
2019-03-21 18:15:37 +01:00
|
|
|
HEAD_REF master
|
2019-05-10 09:14:27 +09:00
|
|
|
PATCHES
|
|
|
|
001-cpr-config.patch
|
2021-06-22 05:23:26 +08:00
|
|
|
${UWP_PATCH}
|
2017-06-20 01:59:25 +02:00
|
|
|
)
|
|
|
|
|
2021-10-18 14:21:39 -07:00
|
|
|
vcpkg_cmake_configure(
|
2017-06-20 01:59:25 +02:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
OPTIONS
|
2021-06-22 05:23:26 +08:00
|
|
|
-DCPR_BUILD_TESTS=OFF
|
|
|
|
-DCPR_FORCE_USE_SYSTEM_CURL=ON
|
2017-06-20 15:36:35 -07:00
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DDISABLE_INSTALL_HEADERS=ON
|
2017-06-20 01:59:25 +02:00
|
|
|
)
|
|
|
|
|
2021-10-18 14:21:39 -07:00
|
|
|
vcpkg_cmake_install()
|
2017-06-20 01:59:25 +02:00
|
|
|
|
2019-05-10 09:14:27 +09:00
|
|
|
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/cprConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/lib/cmake/cpr)
|
2021-10-18 14:21:39 -07:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/cpr)
|
2019-05-10 09:14:27 +09:00
|
|
|
|
2017-06-20 15:36:35 -07:00
|
|
|
vcpkg_copy_pdbs()
|
2017-06-20 01:59:25 +02:00
|
|
|
|
2019-05-10 09:14:27 +09:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
|
2017-06-20 01:59:25 +02:00
|
|
|
# Handle copyright
|
2020-10-13 15:02:41 -07:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|