summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2025-06-19 10:33:08 +0200
committerMichal Klocek <michal.klocek@qt.io>2025-06-26 11:38:06 +0200
commit183a253db4276d22070c050cd65f13fcb1609243 (patch)
treeeca1800ac1c73a916c5d9b664dace1b32d8c173a /src
parent25b7c4435fdb2a79676b4032a5a677cc9cb214cb (diff)
Add configure summary
Make configuration more verbose. Advertise also other backends. Pick-to: 6.10 Change-Id: I6bfac38d1e1f88c7850ced9410477ad0de071055 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/CMakeLists.txt19
-rw-r--r--src/webview/configure.cmake41
-rw-r--r--src/webview/qwebview_global.h1
3 files changed, 49 insertions, 12 deletions
diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt
index 3cbc620..025b6f7 100644
--- a/src/plugins/CMakeLists.txt
+++ b/src/plugins/CMakeLists.txt
@@ -1,19 +1,26 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-if(ANDROID)
+if(QT_FEATURE_webview_android_plugin)
add_subdirectory(android)
-elseif(IOS OR MACOS)
+endif()
+
+if(QT_FEATURE_webview_darwin_plugin)
add_subdirectory(darwin)
-elseif(WASM)
+endif()
+
+if(QT_FEATURE_webview_wasm_plugin)
add_subdirectory(wasm)
endif()
-if(QT_FEATURE_webview_webview2)
+if(QT_FEATURE_webview_webview2_plugin)
add_subdirectory(windows)
-elseif(WINRT)
+endif()
+
+if(QT_FEATURE_webview_winrt_plugin)
add_subdirectory(winrt)
endif()
-if(TARGET Qt::WebEngineCore)
+
+if(QT_FEATURE_webview_webengine_plugin)
add_subdirectory(webengine)
endif()
diff --git a/src/webview/configure.cmake b/src/webview/configure.cmake
index 51ce8c7..18f4d64 100644
--- a/src/webview/configure.cmake
+++ b/src/webview/configure.cmake
@@ -11,19 +11,48 @@ endif()
#### Features
-qt_feature("webview-webview2" PUBLIC
- LABEL "WebView - Microsoft Edge WebView2 plugin"
+qt_feature("webview-webview2-plugin" PUBLIC
+ LABEL "WebView2 (Windows only)"
PURPOSE "Provides native Microsoft Edge WebView2 control as a plugin for Qt WebView."
CONDITION WIN32 AND MSVC AND WebView2_FOUND
)
+qt_feature("webview-webengine-plugin" PUBLIC
+ LABEL "WebEngine"
+ PURPOSE "Provides QtWebEngine based plugin for Qt WebView."
+ CONDITION TARGET Qt::WebEngineCore AND TARGET Qt::WebEngineQuick
+)
+qt_feature("webview-android-plugin" PUBLIC
+ LABEL "Android WebView (Android only)"
+ PURPOSE "Provides Android WebView plugin for Qt WebView."
+ CONDITION ANDROID
+)
+qt_feature("webview-darwin-plugin" PUBLIC
+ LABEL "Darwin WebKit (MacOS and IOS only)"
+ PURPOSE "Provides Darwin Webkit plugin for Qt WebView."
+ CONDITION MACOS OR IOS
+)
+qt_feature("webview-winrt-plugin" PUBLIC
+ LABEL "WinRT WebView (WinRT only)"
+ PURPOSE "Provides WinRT Webview plugin for Qt WebView."
+ CONDITION WINRT
+)
+qt_feature("webview-wasm-plugin" PUBLIC
+ LABEL "Wasm Webview (Web Assembly only)"
+ PURPOSE "Provides Wasm WebView plugin for Qt WebView."
+ CONDITION WASM
+)
-qt_configure_add_summary_section(NAME "Qt WebView Plugin")
-qt_configure_add_summary_entry(ARGS "webview-webview2"
- CONDITION WIN32)
+qt_configure_add_summary_section(NAME "Qt WebView plugins")
+qt_configure_add_summary_entry(ARGS "webview-webengine-plugin")
+qt_configure_add_summary_entry(ARGS "webview-webview2-plugin")
+qt_configure_add_summary_entry(ARGS "webview-android-plugin")
+qt_configure_add_summary_entry(ARGS "webview-darwin-plugin")
+qt_configure_add_summary_entry(ARGS "webview-winrt-plugin")
+qt_configure_add_summary_entry(ARGS "webview-wasm-plugin")
qt_configure_end_summary_section()
qt_configure_add_report_entry(
TYPE WARNING
MESSAGE "No WebView2 SDK found, compiling QtWebView without WebView2 plugin."
- CONDITION WIN32 AND MSVC AND NOT QT_FEATURE_webview_webview2
+ CONDITION WIN32 AND MSVC AND NOT QT_FEATURE_webview_webview2_plugin
)
diff --git a/src/webview/qwebview_global.h b/src/webview/qwebview_global.h
index ee7c2eb..8cd6c43 100644
--- a/src/webview/qwebview_global.h
+++ b/src/webview/qwebview_global.h
@@ -5,6 +5,7 @@
#define QWEBVIEWGLOBAL_H
#include <QtCore/qglobal.h>
+#include <QtWebView/qtwebview-config.h>
QT_BEGIN_NAMESPACE