vcpkg/ports/cpr/portfile.cmake

39 lines
1.0 KiB
CMake
Raw Normal View History

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
if(VCPKG_TARGET_IS_UWP)
set(UWP_PATCH fix-uwp.patch)
endif()
2017-06-20 07:59:25 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO whoshuu/cpr
REF f4622efcb59d84071ae11404ae61bd821c1c344b # v1.6.2
SHA512 7835b7613529798b5edaefc99c907bbc7144133a1fac62a2c9af09c8c7a09b2ea1864544c4c0385969ad3dc64806b8d258abbcd39add2004ed8428741286ff20
HEAD_REF master
PATCHES
001-cpr-config.patch
${UWP_PATCH}
2017-06-20 07:59:25 +08:00
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
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_install_cmake()
2017-06-20 07:59:25 +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)
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
2020-10-14 06:02:41 +08:00
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)