vcpkg/ports/cpr/portfile.cmake

33 lines
813 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.7.0
SHA512 8d48c808f037cbfa284be7de08214cd93277ea419982ef7c2e50fa012ad3901248f7c4b24156cd0e926c22cd0901cb588423ba06202cd8abfa15e5df07527d00
HEAD_REF master
PATCHES
001-cpr-config.patch
2017-06-20 07:59:25 +08:00
)
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
OPTIONS_DEBUG
-DDISABLE_INSTALL_HEADERS=ON
2017-06-20 07:59:25 +08:00
)
vcpkg_cmake_install()
2017-06-20 07:59:25 +08:00
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/cpr)
vcpkg_copy_pdbs()
2017-06-20 07:59:25 +08:00
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
2017-06-20 07:59:25 +08:00
# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)