/
0003-Add-pkgconfig-packaging.patch
53 lines (49 loc) · 1.49 KB
/
0003-Add-pkgconfig-packaging.patch
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
From 316ade83e27fe261849d3335c5c9f5a5ac062feb Mon Sep 17 00:00:00 2001
From: Damien Caliste <dcaliste@free.fr>
Date: Tue, 14 May 2019 13:30:00 +0200
Subject: [PATCH] Add pkgconfig packaging.
---
CMakeLists.txt | 12 ++++++++++++
KF5CalendarCore.pc.in | 12 ++++++++++++
2 files changed, 24 insertions(+)
create mode 100644 KF5CalendarCore.pc.in
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1c27dd317..7fb473963 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -118,4 +118,16 @@ if (NOT KCALENDARCORE_NO_DEPRECATED_NAMESPACE)
)
endif()
+# generate pkg-config file
+set(DEST_DIR "${CMAKE_INSTALL_PREFIX}")
+set(VERSION "${KF5_VERSION}")
+set(COMMA_SEAPARATED_LIST "KF5CalendarCore")
+
+foreach(LIB ${COMMA_SEAPARATED_LIST})
+ set(PRIVATE_LIBS "${PRIVATE_LIBS} -l${LIB}")
+endforeach()
+
+CONFIGURE_FILE("KF5CalendarCore.pc.in" "KF5CalendarCore.pc" @ONLY)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/KF5CalendarCore.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff --git a/KF5CalendarCore.pc.in b/KF5CalendarCore.pc.in
new file mode 100644
index 000000000..b17360158
--- /dev/null
+++ b/KF5CalendarCore.pc.in
@@ -0,0 +1,12 @@
+prefix=@DEST_DIR@
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include/KF5/KCalendarCore
+
+Name: kf5-calendarcore
+Description: A library for handling vCAL objects
+Version: @VERSION@
+
+Requires: Qt5Core Qt5Gui
+Libs: -L${libdir} @PRIVATE_LIBS@
+Cflags: -I${includedir}
--
2.29.2