vcpkg/ports/cpr/portfile.cmake

34 lines
899 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 libcpr/cpr
REF 1.8.1
SHA512 f586b63ddbd9bd03e5c5aa385aad0d4f16f79847e1a14f6dc8a5e0cad4ed89e097ab83484c9ed19e034abf0d2eece13a7609652bc6a1a9caba43189cf0a782db
HEAD_REF master
PATCHES
001-cpr-config.patch
2017-06-20 07:59:25 +08:00
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
ssl CPR_ENABLE_SSL
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
2017-06-20 07:59:25 +08:00
OPTIONS
-DCPR_BUILD_TESTS=OFF
-DCPR_FORCE_USE_SYSTEM_CURL=ON
${FEATURE_OPTIONS}
OPTIONS_DEBUG
-DDISABLE_INSTALL_HEADERS=ON
2017-06-20 07:59:25 +08:00
)
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)