summaryrefslogtreecommitdiff
path: root/kde-apps/kdepim-runtime/files/kdepim-runtime-26.08.2-ews-optional.patch
blob: d915b4abd35aed48300042c064479a7ad725585c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
From a9d76b476f9418c518503145ae54736a1fdc5269 Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Sat, 6 Jun 2026 10:06:34 +0200
Subject: [PATCH] CMake: Add explicit KDEPIM_EWS option

- Make Qt6WebEngine required when enabled
- Qca is only used with KDEPIM_EWS

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
---
 CMakeLists.txt           | 31 +++++++++++++++++--------------
 resources/CMakeLists.txt |  2 +-
 2 files changed, 18 insertions(+), 15 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c168592e8..93a365802 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -132,19 +132,7 @@ set_package_properties(
             REQUIRED
 )
 
-find_package(Qca-qt6 2.3.7 CONFIG REQUIRED)
-set_package_properties(
-    Qca-qt6
-    PROPERTIES
-        DESCRIPTION
-            "Qt Cryptographic Architecture"
-        URL
-            "https://invent.kde.org/libraries/qca"
-        TYPE
-            REQUIRED
-        PURPOSE
-            "Needed for ews resource."
-)
+option(KDEPIM_EWS "Enable EWS resource" ON)
 option(KDEPIM_RUN_AKONADI_TEST "Enable autotest based on Akonadi." TRUE)
 # QT package
 find_package(Qt6TextToSpeech ${QT_REQUIRED_VERSION} CONFIG)
@@ -171,7 +159,22 @@ find_package(
         NetworkAuth
         Concurrent
 )
-find_package(Qt6WebEngineWidgets ${QT_REQUIRED_VERSION} CONFIG)
+if(KDEPIM_EWS)
+    find_package(Qt6WebEngineWidgets ${QT_REQUIRED_VERSION} CONFIG REQUIRED)
+    find_package(Qca-qt6 2.3.7 CONFIG REQUIRED)
+    set_package_properties(
+        Qca-qt6
+        PROPERTIES
+            DESCRIPTION
+                "Qt Cryptographic Architecture"
+            URL
+                "https://invent.kde.org/libraries/qca"
+            TYPE
+                REQUIRED
+            PURPOSE
+                "Needed for ews resource."
+    )
+endif()
 
 # KF6 package
 find_package(KF6Config ${KF_MIN_VERSION} CONFIG REQUIRED)
diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt
index 73605cd7a..18a88c656 100644
--- a/resources/CMakeLists.txt
+++ b/resources/CMakeLists.txt
@@ -67,6 +67,6 @@ add_subdirectory(vcarddir)
 add_subdirectory(icaldir)
 add_subdirectory(vcard)
 add_subdirectory(folderarchivesettings)
-if(TARGET Qt::WebEngineWidgets)
+if(KDEPIM_EWS)
     add_subdirectory(ews)
 endif()
-- 
2.56.0