mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 04:12:19 +08:00
35 lines
971 B
CMake
35 lines
971 B
CMake
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO libcpr/cpr
|
|
REF a2d35a1cb9f3f7e2f1469d6a189751331dc99f96 #v1.9.3
|
|
SHA512 5df799fa53d51ba020a860ff928123921ed0ba59152de2b7e9d88b54ace820f5881fc72d056fca5679a7710357aa25854fa6dd6f9d230338b5378aebfe2bd957
|
|
HEAD_REF master
|
|
PATCHES
|
|
001-cpr-config.patch
|
|
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_FORCE_USE_SYSTEM_CURL=ON
|
|
${FEATURE_OPTIONS}
|
|
OPTIONS_DEBUG
|
|
-DDISABLE_INSTALL_HEADERS=ON
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/cpr)
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|