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
|
|
|
|
REPO whoshuu/cpr
|
2020-10-14 06:02:41 +08:00
|
|
|
REF 5e87cb5f45ac99858f0286dc1c35a6cd27c3bcb9 # v1.5.1
|
|
|
|
SHA512 1ea6295b5568d8d5d099cb1d89d19b3cae873bd869f64be4495be301561c91893f3c1c375823ce18419c780cda52aab79520293ff63ee529ded5431ec511ce5c
|
2019-03-22 01:15:37 +08:00
|
|
|
HEAD_REF master
|
2019-05-10 08:14:27 +08:00
|
|
|
PATCHES
|
|
|
|
001-cpr-config.patch
|
2017-06-20 07:59:25 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-06-21 06:36:35 +08:00
|
|
|
PREFER_NINJA
|
2017-06-20 07:59:25 +08:00
|
|
|
OPTIONS
|
2017-06-21 06:36:35 +08:00
|
|
|
-DBUILD_CPR_TESTS=OFF
|
|
|
|
-DUSE_SYSTEM_CURL=ON
|
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DDISABLE_INSTALL_HEADERS=ON
|
2017-06-20 07:59:25 +08:00
|
|
|
)
|
|
|
|
|
2017-06-21 06:36:35 +08:00
|
|
|
vcpkg_install_cmake()
|
2017-06-20 07:59:25 +08:00
|
|
|
|
2019-05-10 08:14:27 +08:00
|
|
|
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/cprConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/lib/cmake/cpr)
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cpr)
|
|
|
|
|
2017-06-21 06:36:35 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2017-06-20 07:59:25 +08:00
|
|
|
|
2019-05-10 08:14:27 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
|
2017-06-20 07:59:25 +08:00
|
|
|
# Handle copyright
|
2020-10-14 06:02:41 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|