Commit 8725235b authored by Steve Lhomme's avatar Steve Lhomme

contrib: qt: replace the MODULE_AUX_INCLUDES in .pc patch

By a patch found in Qt 5.13.0
parent c4988b10
From 0e844eff19f1174bd5a8f88e8873307ae25cb892 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= <morten.sorvig@qt.io>
Date: Wed, 6 Jun 2018 22:34:33 +0200
Subject: [PATCH] Fix framework include paths in .pc files
The macOS framework build of Qt copies headers to each
framework instead of a centralized include location.
Update the .pc file generator to match this behavior.
Add two include paths to the .pc files:
-Ipath/to/lib/foo.framework/Headers
This makes #include <FooHeader> work.
-Fpath/to/lib
This makes #include <Foo/FooHeader> work.
Task-number: QTBUG-35256
Change-Id: I013ce161c904fe6b7bbb03e33c163d32fdda0647
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
---
mkspecs/features/qt_module.prf | 9 +++++++--
qmake/generators/makefile.cpp | 4 ++++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
index d4b660b77a..24d9ce2096 100644
--- a/mkspecs/features/qt_module.prf
+++ b/mkspecs/features/qt_module.prf
@@ -271,8 +271,13 @@ load(qt_targets)
QMAKE_PKGCONFIG_LIBDIR = $$[QT_HOST_LIBS]
else: \
QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS/raw]
- QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw]
- QMAKE_PKGCONFIG_CFLAGS = -D$$MODULE_DEFINE -I${includedir}/$$MODULE_INCNAME
+ lib_bundle {
+ QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_LIBS/raw]/$${MODULE_INCNAME}.framework/Headers
+ QMAKE_PKGCONFIG_CFLAGS = -D$$MODULE_DEFINE
+ } else {
+ QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw]
+ QMAKE_PKGCONFIG_CFLAGS = -D$$MODULE_DEFINE -I${includedir}/$$MODULE_INCNAME
+ }
QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, "Qt$$QT_MAJOR_VERSION ")
QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$QT_MAJOR_VERSION)
for(i, MODULE_DEPENDS): \
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 78e6633c1c..cdbd84b8cc 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -3328,6 +3328,10 @@ MakefileGenerator::writePkgConfigFile()
;
if (!project->values("QMAKE_DEFAULT_INCDIRS").contains(includeDir))
t << "-I${includedir}";
+ if (target_mode == TARG_MAC_MODE && project->isActiveConfig("lib_bundle")
+ && libDir != QLatin1String("/Library/Frameworks")) {
+ t << " -F${libdir}";
+ }
t << endl;
// requires
--
2.19.1.windows.1
From 41833ff2e8918cf776b7849fd4ab1eab03dd6592 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Mon, 29 Apr 2019 10:49:01 +0200
Subject: [PATCH] include MODULE_AUX_INCLUDES in the generated .pc files
QtANGLE is set on MODULE_AUX_INCLUDES so the headers can be found when building
with angle (gui.pro) but the pkg-config file is missing this header and the Qt
headers cannot be compiled with the path from this config.
Fixes QTBUG-75495
---
mkspecs/features/qt_module.prf | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
index 8bd2d92421..7963356c82 100644
--- a/mkspecs/features/qt_module.prf
+++ b/mkspecs/features/qt_module.prf
@@ -278,6 +278,8 @@ load(qt_targets)
QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw]
QMAKE_PKGCONFIG_CFLAGS = -D$$MODULE_DEFINE -I${includedir}/$$MODULE_INCNAME
}
+ !isEmpty(MODULE_AUX_INCLUDES): \
+ QMAKE_PKGCONFIG_CFLAGS += -I${includedir}/$$section(MODULE_AUX_INCLUDES, /, 1, 1)
QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, "Qt$$QT_MAJOR_VERSION ")
QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$QT_MAJOR_VERSION)
for(i, MODULE_DEPENDS): \
--
2.19.1.windows.1
......@@ -51,7 +51,7 @@ endif
$(APPLY) $(SRC)/qt/0001-qmake-Always-split-QMAKE_DEFAULT_LIBDIRS-using-with-.patch
$(APPLY) $(SRC)/qt/0001-generate-different-pkg-config-files-for-debug-and-re.patch
$(APPLY) $(SRC)/qt/0001-include-MODULE_AUX_INCLUDES-in-the-generated-.pc-fil.patch
$(APPLY) $(SRC)/qt/0001-Fix-framework-include-paths-in-.pc-files.patch
$(MOVE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment