PKGBUILDs/qt5-base/mingw-w64/0029-Hardcode-linker-flags-...

179 lines
8.4 KiB
Diff
Raw Normal View History

2021-04-13 12:24:25 +02:00
From 1af55162492b245d789b9d76234eeef3d0fed5f6 Mon Sep 17 00:00:00 2001
2017-06-02 18:20:04 +02:00
From: Martchus <martchus@gmx.net>
Date: Wed, 25 Jan 2017 23:42:30 +0100
Subject: [PATCH 29/31] Hardcode linker flags for platform plugins
2017-06-02 18:20:04 +02:00
Otherwise incorrect order of libs leads to errors
2019-06-14 19:09:09 +02:00
when building libqminimal.dll, libqoffscreen.dll,
2021-04-13 12:24:25 +02:00
libqwindows.dll and libqdirect2d.dll. Unfortunately
this workaround leads to hardcoding include flags
as well.
2021-04-13 12:24:25 +02:00
Change-Id: I1863d184cff744d2c02e15875e1d108d32ea7861
2017-06-02 18:20:04 +02:00
---
2020-09-10 21:17:46 +02:00
src/plugins/platforms/direct2d/direct2d.pro | 39 +++++++++++++++---
src/plugins/platforms/minimal/minimal.pro | 17 +++++++-
src/plugins/platforms/offscreen/offscreen.pro | 16 +++++++-
src/plugins/platforms/windows/windows.pro | 40 ++++++++++++++-----
4 files changed, 93 insertions(+), 19 deletions(-)
2017-06-02 18:20:04 +02:00
2018-09-19 20:39:07 +02:00
diff --git a/src/plugins/platforms/direct2d/direct2d.pro b/src/plugins/platforms/direct2d/direct2d.pro
2021-04-13 12:24:25 +02:00
index 6e73bd14f9..8046e73d61 100644
2018-09-19 20:39:07 +02:00
--- a/src/plugins/platforms/direct2d/direct2d.pro
+++ b/src/plugins/platforms/direct2d/direct2d.pro
2020-09-10 21:17:46 +02:00
@@ -1,12 +1,41 @@
2018-09-19 20:39:07 +02:00
TARGET = qdirect2d
QT += \
- core-private gui-private \
- eventdispatcher_support-private \
- fontdatabase_support-private theme_support-private
+ core-private gui-private
-qtConfig(accessibility): QT += accessibility_support-private
-qtConfig(vulkan): QT += vulkan_support-private
+# Fix linker error when building libqdirect2d.dll by specifying linker flags for
+# required modules manually (otherwise order is messed)
+LIBS += \
2019-06-14 19:09:09 +02:00
+ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5EventDispatcherSupport.$${QMAKE_EXTENSION_STATICLIB} \
+ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5FontDatabaseSupport.$${QMAKE_EXTENSION_STATICLIB} \
+ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5ThemeSupport.$${QMAKE_EXTENSION_STATICLIB} \
2018-09-19 20:39:07 +02:00
+ -lfreetype -lole32 -lgdi32 -luuid
+# However, this workaround leads to the necessity of specifying include dirs manually
+INCLUDEPATH += \
2021-04-13 12:24:25 +02:00
+ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \
+ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \
+ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \
+ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION} \
+ $$QT_BUILD_TREE/include/QtThemeSupport/$${QT_VERSION}/QtThemeSupport \
+ $$QT_BUILD_TREE/include/QtThemeSupport/$${QT_VERSION}
2018-09-19 20:39:07 +02:00
+# Same for private support libs for accessibility and vulkan, if those are enabled
+qtConfig(accessibility) {
2019-06-14 19:09:09 +02:00
+ LIBS += $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5AccessibilitySupport.$${QMAKE_EXTENSION_STATICLIB}
2020-09-10 21:17:46 +02:00
+ INCLUDEPATH += \
2021-04-13 12:24:25 +02:00
+ $$QT_BUILD_TREE/include/QtAccessibilitySupport/$${QT_VERSION}/Qt5AccessibilitySupport \
+ $$QT_BUILD_TREE/include/QtAccessibilitySupport/$${QT_VERSION}
2018-09-19 20:39:07 +02:00
+}
+qtConfig(vulkan) {
2019-06-14 19:09:09 +02:00
+ LIBS += $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5VulkanSupport.$${QMAKE_EXTENSION_STATICLIB}
2020-09-10 21:17:46 +02:00
+ INCLUDEPATH += \
2021-04-13 12:24:25 +02:00
+ $$QT_BUILD_TREE/include/QtVulkanSupport/$${QT_VERSION}/Qt5VulkanSupport \
+ $$QT_BUILD_TREE/include/QtVulkanSupport/$${QT_VERSION}
2018-09-19 20:39:07 +02:00
+}
+# Also add Qt5WindowsUIAutomationSupport - it seems to link against it
2019-06-14 19:09:09 +02:00
+LIBS += $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5WindowsUIAutomationSupport.$${QMAKE_EXTENSION_STATICLIB}
2020-09-10 21:17:46 +02:00
+INCLUDEPATH += \
2021-04-13 12:24:25 +02:00
+ $$QT_BUILD_TREE/include/Qt5WindowsUIAutomationSupport/$${QT_VERSION}/Qt5WindowsUIAutomationSupport \
+ $$QT_BUILD_TREE/include/Qt5WindowsUIAutomationSupport/$${QT_VERSION}
2018-09-19 20:39:07 +02:00
LIBS += -ldwmapi -lversion
QMAKE_USE_PRIVATE += gdi32 dwrite_1 d2d1_1 d3d11_1 dxgi1_2
2017-06-02 18:20:04 +02:00
diff --git a/src/plugins/platforms/minimal/minimal.pro b/src/plugins/platforms/minimal/minimal.pro
2021-04-13 12:24:25 +02:00
index a1a2da547b..9fd5c4fca2 100644
2017-06-02 18:20:04 +02:00
--- a/src/plugins/platforms/minimal/minimal.pro
+++ b/src/plugins/platforms/minimal/minimal.pro
2020-09-10 21:17:46 +02:00
@@ -1,8 +1,21 @@
2017-06-02 18:20:04 +02:00
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 += \
2019-06-14 19:09:09 +02:00
+ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5EventDispatcherSupport.$${QMAKE_EXTENSION_STATICLIB} \
+ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5FontDatabaseSupport.$${QMAKE_EXTENSION_STATICLIB} \
2017-06-02 18:20:04 +02:00
+ -lfreetype -lole32 -lgdi32 -luuid
+# However, this workaround leads to the necessity of specifying include dirs manually
+INCLUDEPATH += \
2021-04-13 12:24:25 +02:00
+ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \
+ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \
+ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \
+ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}
2017-06-02 18:20:04 +02:00
+
DEFINES += QT_NO_FOREACH
diff --git a/src/plugins/platforms/offscreen/offscreen.pro b/src/plugins/platforms/offscreen/offscreen.pro
2021-04-13 12:24:25 +02:00
index f226132592..592fa7406f 100644
2017-06-02 18:20:04 +02:00
--- a/src/plugins/platforms/offscreen/offscreen.pro
+++ b/src/plugins/platforms/offscreen/offscreen.pro
2020-09-10 21:17:46 +02:00
@@ -1,8 +1,20 @@
2017-06-02 18:20:04 +02:00
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 += \
2019-06-14 19:09:09 +02:00
+ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5EventDispatcherSupport.$${QMAKE_EXTENSION_STATICLIB} \
+ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5FontDatabaseSupport.$${QMAKE_EXTENSION_STATICLIB} \
2017-06-02 18:20:04 +02:00
+ -lfreetype -lole32 -lgdi32 -luuid
+# However, this workaround leads to the necessity of specifying include dirs manually
+INCLUDEPATH += \
2021-04-13 12:24:25 +02:00
+ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \
+ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \
+ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \
+ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}
2017-06-02 18:20:04 +02:00
DEFINES += QT_NO_FOREACH
diff --git a/src/plugins/platforms/windows/windows.pro b/src/plugins/platforms/windows/windows.pro
2021-04-13 12:24:25 +02:00
index 50a3bb41a9..02f74650a9 100644
2017-06-02 18:20:04 +02:00
--- a/src/plugins/platforms/windows/windows.pro
+++ b/src/plugins/platforms/windows/windows.pro
2020-09-10 21:17:46 +02:00
@@ -1,15 +1,35 @@
2017-06-02 18:20:04 +02:00
TARGET = qwindows
2017-12-08 19:49:53 +01:00
-QT += \
2017-06-02 18:20:04 +02:00
- core-private gui-private \
2017-12-08 19:49:53 +01:00
- eventdispatcher_support-private \
2017-06-02 18:20:04 +02:00
- fontdatabase_support-private theme_support-private
2017-12-08 19:49:53 +01:00
-
-qtConfig(accessibility): QT += accessibility_support-private
-qtConfig(vulkan): QT += vulkan_support-private
-
-LIBS += -ldwmapi
-QMAKE_USE_PRIVATE += gdi32
2017-12-08 19:49:53 +01:00
+QT += core-private gui-private
+
2017-06-02 18:20:04 +02:00
+# Fix linker error when building libqwindows.dll by specifying linker flags for
+# required modules manually (otherwise order is messed)
+LIBS += \
2019-06-14 19:09:09 +02:00
+ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5EventDispatcherSupport.$${QMAKE_EXTENSION_STATICLIB} \
+ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5FontDatabaseSupport.$${QMAKE_EXTENSION_STATICLIB} \
+ $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5ThemeSupport.$${QMAKE_EXTENSION_STATICLIB} \
2017-06-02 18:20:04 +02:00
+ -lfreetype -lole32 -lgdi32 -ldwmapi
+# However, this workaround leads to the necessity of specifying include dirs manually
+INCLUDEPATH += \
2021-04-13 12:24:25 +02:00
+ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION}/QtEventDispatcherSupport \
+ $$QT_BUILD_TREE/include/QtEventDispatcherSupport/$${QT_VERSION} \
+ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION}/QtFontDatabaseSupport \
+ $$QT_BUILD_TREE/include/QtFontDatabaseSupport/$${QT_VERSION} \
+ $$QT_BUILD_TREE/include/QtThemeSupport/$${QT_VERSION}/QtThemeSupport \
+ $$QT_BUILD_TREE/include/QtThemeSupport/$${QT_VERSION}
2017-12-08 19:49:53 +01:00
+# Same for private support libs for accessibility and vulkan, if those are enabled
+qtConfig(accessibility) {
2019-06-14 19:09:09 +02:00
+ LIBS += $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5AccessibilitySupport.$${QMAKE_EXTENSION_STATICLIB}
2020-09-10 21:17:46 +02:00
+ INCLUDEPATH += \
2021-04-13 12:24:25 +02:00
+ $$QT_BUILD_TREE/include/QtAccessibilitySupport/$${QT_VERSION}/Qt5AccessibilitySupport \
+ $$QT_BUILD_TREE/include/QtAccessibilitySupport/$${QT_VERSION}
2017-12-08 19:49:53 +01:00
+}
+qtConfig(vulkan) {
2019-06-14 19:09:09 +02:00
+ LIBS += $$QT_BUILD_TREE/lib/$${QMAKE_PREFIX_STATICLIB}Qt5VulkanSupport.$${QMAKE_EXTENSION_STATICLIB}
2020-09-10 21:17:46 +02:00
+ INCLUDEPATH += \
2021-04-13 12:24:25 +02:00
+ $$QT_BUILD_TREE/include/QtVulkanSupport/$${QT_VERSION}/Qt5VulkanSupport \
+ $$QT_BUILD_TREE/include/QtVulkanSupport/$${QT_VERSION}
2017-12-08 19:49:53 +01:00
+}
2017-06-02 18:20:04 +02:00
include(windows.pri)
--
2021-04-13 12:24:25 +02:00
2.31.1
2017-06-02 18:20:04 +02:00