diff options
Diffstat (limited to 'vcpkg/scripts/test_ports/vcpkg-ci-qtwebengine')
4 files changed, 93 insertions, 0 deletions
diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-qtwebengine/portfile.cmake b/vcpkg/scripts/test_ports/vcpkg-ci-qtwebengine/portfile.cmake new file mode 100644 index 0000000..e3a7604 --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-qtwebengine/portfile.cmake @@ -0,0 +1,13 @@ +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled)
+
+if(EXISTS "${CURRENT_INSTALLED_DIR}/share/Qt6Pdf/Qt6PdfTargets.cmake")
+ file(COPY_FILE "${CURRENT_INSTALLED_DIR}/share/Qt6Pdf/Qt6PdfTargets.cmake" "${CURRENT_BUILDTREES_DIR}/Qt6PdfTargets.cmake-${TARGET_TRIPLET}.log")
+endif()
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${CURRENT_PORT_DIR}/project"
+ OPTIONS
+ "-DFEATURES=${FEATURES}"
+)
+
+vcpkg_cmake_build()
diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-qtwebengine/project/CMakeLists.txt b/vcpkg/scripts/test_ports/vcpkg-ci-qtwebengine/project/CMakeLists.txt new file mode 100644 index 0000000..be214f8 --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-qtwebengine/project/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.24)
+
+project(vcpkg-ci-qtwebengine LANGUAGES C CXX)
+
+add_executable(main main.cpp)
+
+if("pdf" IN_LIST FEATURES)
+ find_package(Qt6 REQUIRED COMPONENTS Pdf)
+ target_link_libraries(main PRIVATE Qt6::Pdf)
+ target_compile_definitions(main PRIVATE REQUIRE_PDF)
+endif()
+
+if("webengine" IN_LIST FEATURES)
+ find_package(Qt6 REQUIRED COMPONENTS WebEngineCore)
+ target_link_libraries(main PRIVATE Qt6::WebEngineCore)
+ target_compile_definitions(main PRIVATE REQUIRE_WEBENGINE)
+endif()
diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-qtwebengine/project/main.cpp b/vcpkg/scripts/test_ports/vcpkg-ci-qtwebengine/project/main.cpp new file mode 100644 index 0000000..ecb352b --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-qtwebengine/project/main.cpp @@ -0,0 +1,18 @@ +#ifdef REQUIRE_PDF
+#include <QPdfDocument>
+#endif
+#ifdef REQUIRE_WEBENGINE
+#include <QWebEnginePage>
+#endif
+
+int main()
+{
+#ifdef REQUIRE_PDF
+ QPdfDocument doc(nullptr);
+#endif
+#ifdef REQUIRE_WEBENGINE
+ QObject* parent = nullptr;
+ QWebEnginePage page(parent);
+#endif
+ return 0;
+}
diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-qtwebengine/vcpkg.json b/vcpkg/scripts/test_ports/vcpkg-ci-qtwebengine/vcpkg.json new file mode 100644 index 0000000..545ad61 --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-qtwebengine/vcpkg.json @@ -0,0 +1,45 @@ +{ + "name": "vcpkg-ci-qtwebengine", + "version-string": "ci", + "description": "Testing qtwebengine", + "license": null, + "dependencies": [ + "qtwebengine", + { + "name": "vcpkg-cmake", + "host": true + } + ], + "default-features": [ + "ci" + ], + "features": { + "ci": { + "description": "Default CI configuration", + "dependencies": [ + { + "name": "vcpkg-ci-qtwebengine", + "default-features": false, + "features": [ + "pdf" + ], + "platform": "android | ios | (linux & !x86) | osx | (windows & x64 & !static)" + }, + { + "name": "vcpkg-ci-qtwebengine", + "default-features": false, + "features": [ + "webengine" + ], + "platform": "!static & ((linux & !x86) | osx | (windows & x64 & !static))" + } + ] + }, + "pdf": { + "description": "Test PDF module" + }, + "webengine": { + "description": "Test WebEngine module" + } + } +} |