aboutsummarylogtreecommitdiffstats
path: root/0031-Hardcode-linker-flags-for-platform-plugins.patch
blob: f345dfe4ed8420d2b020e89a48e24aa1f0850ce4 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
From 738bee43dfef8244cd811c293a90c43b58c2ab20 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Wed, 25 Jan 2017 23:42:30 +0100
Subject: [PATCH 31/31] Hardcode linker flags for platform plugins

Otherwise incorrect order of libs leads to errors
when building libqminimal.dll, libqoffscreen.dll
and libqwindows.dll

Change-Id: I594ddcc15599c63bb8ac5e998f59c4561a18eb26
---
 src/plugins/platforms/minimal/minimal.pro     | 15 +++++++++++++--
 src/plugins/platforms/offscreen/offscreen.pro | 14 ++++++++++++--
 src/plugins/platforms/windows/windows.pro     | 19 +++++++++++++++----
 3 files changed, 40 insertions(+), 8 deletions(-)

diff --git a/src/plugins/platforms/minimal/minimal.pro b/src/plugins/platforms/minimal/minimal.pro
index 8cfb68824e..46834a71fc 100644
--- a/src/plugins/platforms/minimal/minimal.pro
+++ b/src/plugins/platforms/minimal/minimal.pro
@@ -1,8 +1,19 @@
 TARGET = qminimal
 
 QT += \
-    core-private gui-private \
-    eventdispatcher_support-private fontdatabase_support-private
+    core-private gui-private
+
+# Fix linker error when building libqminimal.dll by specifying linker flags for
+# required modules manually (otherwise order is messed)
+LIBS += \
+    -lQt5EventDispatcherSupport \
+    -lQt5FontDatabaseSupport \
+    -lfreetype -lole32 -lgdi32 -luuid
+# However, this workaround leads to the necessity of specifying include dirs manually
+INCLUDEPATH += \
+    $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \
+    $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}
+
 
 DEFINES += QT_NO_FOREACH
 
diff --git a/src/plugins/platforms/offscreen/offscreen.pro b/src/plugins/platforms/offscreen/offscreen.pro
index 6652cefd86..a322b17cc5 100644
--- a/src/plugins/platforms/offscreen/offscreen.pro
+++ b/src/plugins/platforms/offscreen/offscreen.pro
@@ -1,8 +1,18 @@
 TARGET = qoffscreen
 
 QT += \
-    core-private gui-private \
-    eventdispatcher_support-private fontdatabase_support-private
+    core-private gui-private
+
+# Fix linker error when building libqoffscreen.dll by specifying linker flags for
+# required modules manually (otherwise order is messed)
+LIBS += \
+    -lQt5EventDispatcherSupport \
+    -lQt5FontDatabaseSupport \
+    -lfreetype -lole32 -lgdi32 -luuid
+# However, this workaround leads to the necessity of specifying include dirs manually
+INCLUDEPATH += \
+    $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \
+    $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}
 
 DEFINES += QT_NO_FOREACH
 
diff --git a/src/plugins/platforms/windows/windows.pro b/src/plugins/platforms/windows/windows.pro
index 23168c10dc..eb4af726ca 100644
--- a/src/plugins/platforms/windows/windows.pro
+++ b/src/plugins/platforms/windows/windows.pro
@@ -1,11 +1,22 @@
 TARGET = qwindows
 
 QT += \
-    core-private gui-private \
-    eventdispatcher_support-private accessibility_support-private \
-    fontdatabase_support-private theme_support-private
+    core-private gui-private
 
-LIBS += -lgdi32 -ldwmapi
+# Fix linker error when building libqwindows.dll by specifying linker flags for
+# required modules manually (otherwise order is messed)
+LIBS += \
+    -lQt5EventDispatcherSupport \
+    -lQt5AccessibilitySupport \
+    -lQt5FontDatabaseSupport \
+    -lQt5ThemeSupport \
+    -lfreetype -lole32 -lgdi32 -ldwmapi
+# However, this workaround leads to the necessity of specifying include dirs manually
+INCLUDEPATH += \
+    $$QT_SOURCE_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \
+    $$QT_SOURCE_TREE/include/QtAccessibilitySupport/$${QT_VERSION} \
+    $$QT_SOURCE_TREE/include/QtFontDatabaseSupport/$${QT_VERSION} \
+    $$QT_SOURCE_TREE/include/QtThemeSupport/$${QT_VERSION}
 
 include(windows.pri)
 
-- 
2.13.2