[rkward/work/qtwebengine] /: Enforce minimum version requirement for QWebEngine.
Thomas Friedrichsmeier
null at kde.org
Tue Mar 31 14:19:03 BST 2020
Git commit 83c6cbfa7b187b045cf40ad85d5ae908b442400b by Thomas Friedrichsmeier.
Committed on 30/03/2020 at 20:09.
Pushed by tfry into branch 'work/qtwebengine'.
Enforce minimum version requirement for QWebEngine.
Older systems can safely fall back to QtWebKit.
M +10 -9 CMakeLists.txt
https://commits.kde.org/rkward/83c6cbfa7b187b045cf40ad85d5ae908b442400b
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d8a12bed..6a8397d0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,17 +24,18 @@ INCLUDE(FeatureSummary)
FIND_PACKAGE(Qt5 5.2 CONFIG REQUIRED COMPONENTS Widgets Core Xml Network Script PrintSupport)
FIND_PACKAGE(KF5 5.2 REQUIRED COMPONENTS CoreAddons DocTools I18n XmlGui TextEditor WidgetsAddons Parts Config Notifications WindowSystem OPTIONAL_COMPONENTS Crash)
IF(NOT NO_QT_WEBENGINE)
- FIND_PACKAGE(Qt5 5.6 OPTIONAL_COMPONENTS WebEngineWidgets)
+ FIND_PACKAGE(Qt5 5.2 OPTIONAL_COMPONENTS WebEngineWidgets)
+ IF(NOT Qt5WebEngineWidgets_FOUND OR Qt5WebEngineWidgets_VERSION VERSION_LESS "5.14.0")
+ MESSAGE(STATUS "QWebEngine not available (or version < 5.12). Falling back to QtWebKit")
+ SET(NO_QT_WEBENGINE 1)
+ ENDIF()
ENDIF(NOT NO_QT_WEBENGINE)
-IF(NOT Qt5WebEngineWidgets_FOUND)
- FIND_PACKAGE(KF5 5.2 OPTIONAL_COMPONENTS WebKit)
- IF(NOT KF5_WebKit_FOUND)
- MESSAGE(FATAL_ERROR "At least one of KF5WebKit or QtWebEngine is required. Neither was found on this system.")
- ENDIF(NOT KF5_WebKit_FOUND)
+IF(NO_QT_WEBENGINE)
+ FIND_PACKAGE(KF5 5.2 REQUIRED COMPONENTS WebKit)
ADD_DEFINITIONS(-DNO_QT_WEBENGINE) # TODO: rather set it for rkhtmlwindow, only
-ELSE(NOT Qt5WebEngineWidgets_FOUND)
- MESSAGE(STATUS "QtWebEngine will be used for rendering HTML. To use KF5WebKit, instead (if available), pass -DNO_QT_WEBENGINE in your call to cmake.")
-ENDIF(NOT Qt5WebEngineWidgets_FOUND)
+ELSE(NO_QT_WEBENGINE)
+ MESSAGE(STATUS "QtWebEngine will be used for rendering HTML. To use KF5WebKit, instead (if available), pass -DNO_QT_WEBENGINE=1 in your call to cmake.")
+ENDIF(NO_QT_WEBENGINE)
FIND_PACKAGE(Gettext REQUIRED)
# FindIntl in cmake is broken for MSVC on Windows, (and only included from 3.2.3 upwards).
More information about the rkward-tracker
mailing list