From dd523573f2981cc58d4da0ec6e2b061a6172a8eb Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Wed, 10 Feb 2021 17:03:01 +0100 Subject: Add examples to the cmake build Add only quick and widget examples to the build for now. Update examples qmake files so the ci can also build qmake examples after the cmake bulid. Note this patch breakes qmake builds. Task-number: QTBUG-91760 Change-Id: Ia867a49bc3deab1967bdedcf525ad4afe3967c2a Reviewed-by: Allan Sandfeld Jensen --- examples/CMakeLists.txt | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 examples/CMakeLists.txt (limited to 'examples/CMakeLists.txt') diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt new file mode 100644 index 000000000..6d366112c --- /dev/null +++ b/examples/CMakeLists.txt @@ -0,0 +1,31 @@ +cmake_minimum_required(VERSION 3.19) + +include(${CMAKE_CURRENT_LIST_DIR}/../.cmake.conf) + +project(QtWebEngineExamples + VERSION "${QT_REPO_MODULE_VERSION}" + DESCRIPTION "Qt WebEngine Examples" + HOMEPAGE_URL "https://qt.io/" + LANGUAGES CXX C +) + +find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core) +find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS WebEngineCore WebEngineWidgets WebEngineQuick) +qt_build_repo_begin() +qt_examples_build_begin() + +if(QT_FEATURE_qtwebengine_build AND QT_FEATURE_qtwebengine_quick_build) + add_subdirectory(webengine) +endif() +if(QT_FEATURE_qtwebengine_build AND QT_FEATURE_qtwebengine_widgets_build) + add_subdirectory(webenginewidgets) +endif() +if(QT_FEATURE_qtpdf_build ) + add_subdirectory(pdf) +endif() +if(QT_FEATURE_qtpdf_build AND QT_FEATURE_pdf_widgets) + add_subdirectory(pdfwidgets) +endif() + +qt_examples_build_end() +qt_build_repo_end() -- cgit v1.2.3