mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 19:59:06 +08:00
38 lines
1.0 KiB
CMake
38 lines
1.0 KiB
CMake
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO libcpr/cpr
|
|
REF ${VERSION}
|
|
SHA512 c314fc576fb8be36bf43326a8a2d8b22d6b2fbb3b494695b84dd8077fc0401981e49890172fc2229d1c68292be2820cd4231d58bcb64326cbe4b73933c092d76
|
|
HEAD_REF master
|
|
PATCHES
|
|
disable_werror.patch
|
|
)
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
FEATURES
|
|
ssl CPR_ENABLE_SSL
|
|
)
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
-DCPR_BUILD_TESTS=OFF
|
|
-DCPR_USE_SYSTEM_CURL=ON
|
|
${FEATURE_OPTIONS}
|
|
# 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
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/cpr)
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|