2019-03-22 01:15:37 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2017-06-20 07:59:25 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2021-10-19 05:21:39 +08:00
|
|
|
REPO libcpr/cpr
|
2023-10-19 01:15:03 +08:00
|
|
|
REF ${VERSION}
|
2024-11-01 14:44:19 +08:00
|
|
|
SHA512 c314fc576fb8be36bf43326a8a2d8b22d6b2fbb3b494695b84dd8077fc0401981e49890172fc2229d1c68292be2820cd4231d58bcb64326cbe4b73933c092d76
|
2019-03-22 01:15:37 +08:00
|
|
|
HEAD_REF master
|
2019-05-10 08:14:27 +08:00
|
|
|
PATCHES
|
2022-08-11 02:28:51 +08:00
|
|
|
disable_werror.patch
|
2017-06-20 07:59:25 +08:00
|
|
|
)
|
|
|
|
|
2022-04-07 03:03:32 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
ssl CPR_ENABLE_SSL
|
|
|
|
)
|
|
|
|
|
2021-10-19 05:21:39 +08:00
|
|
|
vcpkg_cmake_configure(
|
2021-12-07 12:21:05 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2023-10-19 01:15:03 +08:00
|
|
|
OPTIONS
|
2021-06-22 05:23:26 +08:00
|
|
|
-DCPR_BUILD_TESTS=OFF
|
2024-03-14 06:48:53 +08:00
|
|
|
-DCPR_USE_SYSTEM_CURL=ON
|
2022-04-07 03:03:32 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2024-03-14 06:48:53 +08:00
|
|
|
# skip test for unused sanitizer flags
|
|
|
|
-DTHREAD_SANITIZER_AVAILABLE=OFF
|
|
|
|
-DADDRESS_SANITIZER_AVAILABLE=OFF
|
|
|
|
-DLEAK_SANITIZER_AVAILABLE=OFF
|
|
|
|
-DUNDEFINED_BEHAVIOUR_SANITIZER_AVAILABLE=OFF
|
|
|
|
-DALL_SANITIZERS_AVAILABLE=OFF
|
2017-06-20 07:59:25 +08:00
|
|
|
)
|
|
|
|
|
2021-10-19 05:21:39 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/cpr)
|
2019-05-10 08:14:27 +08:00
|
|
|
|
2021-12-07 12:21:05 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2019-05-10 08:14:27 +08:00
|
|
|
|
2023-04-22 05:54:16 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|