From 034298f677f83835174b507f05d21bb0ac750024 Mon Sep 17 00:00:00 2001 From: Vitaly Date: Tue, 17 Oct 2023 22:36:06 +0400 Subject: [PATCH] [libqtrest] Add new port (#34455) * QtRest: new port * Fix ref * Fix ref * Fix ref * qtrest -> libqtrest, review changes * versions * cleanups --- ports/libqtrest/portfile.cmake | 35 ++++++++++++++++++++++++++++++++++ ports/libqtrest/vcpkg.json | 29 ++++++++++++++++++++++++++++ versions/baseline.json | 4 ++++ versions/l-/libqtrest.json | 9 +++++++++ 4 files changed, 77 insertions(+) create mode 100644 ports/libqtrest/portfile.cmake create mode 100644 ports/libqtrest/vcpkg.json create mode 100644 versions/l-/libqtrest.json diff --git a/ports/libqtrest/portfile.cmake b/ports/libqtrest/portfile.cmake new file mode 100644 index 00000000000000..f518909e0d44a2 --- /dev/null +++ b/ports/libqtrest/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO qtrest/qtrest + REF ${VERSION} + SHA512 2bdbbdde7c4f7a27943c93a2a26abe89e087e6b7c32d0e481422a8ad3e78c66c6921ef00c1cbf17f3b61db8a678685371c819218d10576ac9ec1548262415c04 + HEAD_REF master +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(BUILD_TYPE SHARED) +else() + set(BUILD_TYPE STATIC) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + qml WITH_QML_SUPPORT +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TYPE=${BUILD_TYPE} + -DBUILD_EXAMPLE=0 + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() diff --git a/ports/libqtrest/vcpkg.json b/ports/libqtrest/vcpkg.json new file mode 100644 index 00000000000000..4ba8ac6a47cad0 --- /dev/null +++ b/ports/libqtrest/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "libqtrest", + "version": "0.4.0", + "description": "Small and simple REST API (Json/Xml) client for any Qt/QML C++ application", + "homepage": "https://github.com/qtrest/qtrest", + "license": "MIT", + "supports": "!uwp", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + { + "name": "vcpkg-cmake", + "host": true + } + ], + "features": { + "qml": { + "description": "Enable QML support to compile with required dependencies", + "dependencies": [ + { + "name": "qt5-declarative", + "default-features": false + } + ] + } + } +} diff --git a/versions/baseline.json b/versions/baseline.json index 7c6341ec6a1598..adc6e74db83671 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4600,6 +4600,10 @@ "baseline": "4.1.1", "port-version": 2 }, + "libqtrest": { + "baseline": "0.4.0", + "port-version": 0 + }, "librabbitmq": { "baseline": "0.11.0", "port-version": 2 diff --git a/versions/l-/libqtrest.json b/versions/l-/libqtrest.json new file mode 100644 index 00000000000000..76765128975b10 --- /dev/null +++ b/versions/l-/libqtrest.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "efcb288a743d19fa7e795479221b17644864890e", + "version": "0.4.0", + "port-version": 0 + } + ] +}