diff options
Diffstat (limited to 'vcpkg/ports/cpr')
| -rw-r--r-- | vcpkg/ports/cpr/disable_werror.patch | 13 | ||||
| -rw-r--r-- | vcpkg/ports/cpr/portfile.cmake | 35 | ||||
| -rw-r--r-- | vcpkg/ports/cpr/vcpkg.json | 42 |
3 files changed, 90 insertions, 0 deletions
diff --git a/vcpkg/ports/cpr/disable_werror.patch b/vcpkg/ports/cpr/disable_werror.patch new file mode 100644 index 0000000..73cc120 --- /dev/null +++ b/vcpkg/ports/cpr/disable_werror.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 70d3296..293ce95 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -379,7 +379,7 @@ if(CPR_BUILD_TESTS) + restore_variable(DESTINATION CMAKE_CXX_CLANG_TIDY BACKUP CMAKE_CXX_CLANG_TIDY_BKP) + endif() + +-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") ++if (1) + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Werror") + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") diff --git a/vcpkg/ports/cpr/portfile.cmake b/vcpkg/ports/cpr/portfile.cmake new file mode 100644 index 0000000..859ecbf --- /dev/null +++ b/vcpkg/ports/cpr/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libcpr/cpr + REF ${VERSION} + SHA512 577a7ddae24fa85e5ce379468f05f4ddf6c1f48859204e4d53653b59581fcb77662bf63aa8b31a85fb0c19ec8412b8a9bfcd2a047e49f56f6a2ee24c3f1620c9 + HEAD_REF master + PATCHES + 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_USE_SYSTEM_CURL=ON + ${FEATURE_OPTIONS} + # skip test for unused sanitizer flags + -DTHREAD_SANITIZER_AVAILABLE=OFF + -DADDRESS_SANITIZER_AVAILABLE=OFF + -DLEAK_SANITIZER_AVAILABLE=OFF + -DUNDEFINED_BEHAVIOUR_SANITIZER_AVAILABLE=OFF + -DALL_SANITIZERS_AVAILABLE=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/cpr) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/vcpkg/ports/cpr/vcpkg.json b/vcpkg/ports/cpr/vcpkg.json new file mode 100644 index 0000000..73b9ba9 --- /dev/null +++ b/vcpkg/ports/cpr/vcpkg.json @@ -0,0 +1,42 @@ +{ + "name": "cpr", + "version-semver": "1.12.0", + "description": "C++ Requests is a simple wrapper around libcurl inspired by the excellent Python Requests project.", + "homepage": "https://github.com/libcpr/cpr", + "license": "MIT", + "dependencies": [ + { + "name": "curl", + "default-features": false + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "ssl" + ], + "features": { + "ssl": { + "description": "Enable SSL support", + "dependencies": [ + { + "name": "curl", + "default-features": false, + "features": [ + "ssl" + ] + }, + { + "name": "openssl", + "platform": "linux" + } + ] + } + } +} |