aboutsummaryrefslogtreecommitdiff
path: root/finance/kraft/files/patch-0003-Fix-Akonadi-legacy-detection
blob: 64e346705d25c6d9f683363e60567eee05a9b5ed (plain) (blame)
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
From 66b64505bbfbc3285ba34ccacdf454720c8e0abc Mon Sep 17 00:00:00 2001
From: Klaas Freitag <kraft@freisturz.de>
Date: Mon, 1 May 2023 14:09:09 +0200
Subject: [PATCH] Fix Akonadi legacy detection

---
 CMakeLists.txt | 8 +++++++-
 INSTALL.md     | 3 +++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git CMakeLists.txt CMakeLists.txt
index f5ecc41..82b4e07 100644
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -8,8 +8,14 @@ find_package(ECM REQUIRED NO_MODULE)
 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
 set(CMAKE_AUTOMOC TRUE)
 
+option(AKONADI_LEGACY_BUILD "Build with older versions of Akonadi (KF5 Prefix)" OFF)
 # Akonadi Prefix: Set this to KF5 for builds with Akonadi Libs before 5.23
-option(AKO_PREFIX "Akonadi Prefix, either KF5 or KPim5, can be set by -DAKO_PREFIX=KF5" "KPim5")
+set(AKO_PREFIX "KPim5")
+
+if (AKONADI_LEGACY_BUILD)
+  set(AKO_PREFIX "KF5")
+endif()
+message("Akonadi Prefix is ${AKO_PREFIX}")
 
 include(KDEInstallDirs)
 include(KDECMakeSettings)
diff --git INSTALL.md INSTALL.md
index 1edd0ae..77d559c 100644
--- INSTALL.md
+++ INSTALL.md
@@ -59,6 +59,9 @@ These are optional to build with Akonadi Support:
 - akonadi-contact-devel
 - akonadi-devel
 
+To build with Akonadi versions before 23.04, cmake has to run wtih the
+build option `-DAKONADI_LEGACY_BUILD=ON` to use the old prefix KF5.
+
 ### Build Kraft
 
 cmake is designed so that the build process can be done in a separate
-- 
2.41.0