summarylogtreecommitdiffstats
path: root/0003-Fix-using-static-PCRE2-and-DBus-1.patch
blob: d15fe6a7256b87d75e27e58aead97686b803e78a (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
From 7e76f866f256a65e49dab374c90366f98bcb2415 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Thu, 5 Nov 2020 21:13:19 +0100
Subject: [PATCH 03/17] Fix using static PCRE2 and DBus-1

When making a static build of Qt we're using the static version of these
libraries and must define the corresponding macros.

Change-Id: I2387b79462b6d183b71f9433dd937f63fc7ef26e
---
 src/corelib/text/qregularexpression.cpp | 5 +++++
 src/dbus/qdbus_symbols_p.h              | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/src/corelib/text/qregularexpression.cpp b/src/corelib/text/qregularexpression.cpp
index a1e288ae6ce..41f943cdf19 100644
--- a/src/corelib/text/qregularexpression.cpp
+++ b/src/corelib/text/qregularexpression.cpp
@@ -20,6 +20,11 @@
 #endif
 
 #define PCRE2_CODE_UNIT_WIDTH 16
+#ifdef QT_STATIC
+#define PCRE_STATIC
+#define PCRE2_STATIC
+#endif
+#define PCRE2_EXP_DECL Q_CORE_EXPORT
 
 #include <pcre2.h>
 
diff --git a/src/dbus/qdbus_symbols_p.h b/src/dbus/qdbus_symbols_p.h
index 78b7e049ef3..d06a3b04aac 100644
--- a/src/dbus/qdbus_symbols_p.h
+++ b/src/dbus/qdbus_symbols_p.h
@@ -21,6 +21,10 @@
 
 #ifndef QT_NO_DBUS
 
+#ifdef QT_STATIC
+#  define DBUS_STATIC_BUILD
+#endif
+
 #ifdef QT_LINKED_LIBDBUS
 #  include <dbus/dbus.h>
 #else
-- 
2.44.0