Make QtWebEngine an optional requirement
authorPino Toscano <pino@debian.org>
Thu, 13 Aug 2020 22:44:34 +0000 (23:44 +0100)
committerPino Toscano <pino@debian.org>
Thu, 13 Aug 2020 22:44:34 +0000 (23:44 +0100)
Forwarded: no
Last-Update: 2020-08-14

This makes it possible to build kaccount-provides, albeith without the
nextcloud plugin, also on architectures that do not have QtWebEngine.

Gbp-Pq: Name optional-qtwebengine.diff

CMakeLists.txt
plugins/CMakeLists.txt

index 0c59f7d6c6a4a994779e1bf312d1b0b51f0c9868..b0c4c953328b937f49a195c9c2ca7e723f9aa776 100644 (file)
@@ -16,7 +16,8 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${ECM_MODULE_P
 find_package(Intltool REQUIRED)
 find_package(KAccounts REQUIRED)
 
-find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Core Qml WebEngineWidgets)
+find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Core Qml)
+find_package(Qt5WebEngineWidgets ${QT_REQUIRED_VERSION} CONFIG)
 find_package(KF5 ${KF5_MIN_VERSION} REQUIRED KIO I18n Declarative Package)
 
 include(KDEInstallDirs)
index 3ea18172a071c5c0a27263d57ca1111f71224cd4..b9a12a529ede5c84a9eb7457eff101bddc5e4b0c 100644 (file)
@@ -1,2 +1,4 @@
 add_subdirectory(owncloud-ui)
-add_subdirectory(nextcloud-ui)
\ No newline at end of file
+if (Qt5WebEngineWidgets_FOUND)
+  add_subdirectory(nextcloud-ui)
+endif()