[vlc-devel] [PATCH 3.0 30/41] contrib: qt: generate different pkg-config files for debug and release targets

Steve Lhomme robux4 at ycbcr.xyz
Tue Jul 7 15:11:29 CEST 2020


Fixes QTBUG-75468

(cherry picked from commit bcd65246079919849daf49751cce37ee9535ee33) (rebased)

rebased:
- the code after the patch applying is different

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
---
 ...nt-pkg-config-files-for-debug-and-re.patch | 34 +++++++++++++++++++
 contrib/src/qt/rules.mak                      |  2 ++
 2 files changed, 36 insertions(+)
 create mode 100644 contrib/src/qt/0001-generate-different-pkg-config-files-for-debug-and-re.patch

diff --git a/contrib/src/qt/0001-generate-different-pkg-config-files-for-debug-and-re.patch b/contrib/src/qt/0001-generate-different-pkg-config-files-for-debug-and-re.patch
new file mode 100644
index 0000000000..feaa0fa972
--- /dev/null
+++ b/contrib/src/qt/0001-generate-different-pkg-config-files-for-debug-and-re.patch
@@ -0,0 +1,34 @@
+From 533641dced8e5a630940490a30812ee299ef880f Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Mon, 29 Apr 2019 08:16:39 +0200
+Subject: [PATCH] generate different pkg-config files for debug and release
+ targets
+
+When generating a release-only build the release and debug makefiles are
+generated, in that order. So the debug .pc file overwrites the release one,
+making pkg-config using debug targets that are not even built.
+
+This is only needed on Windows targets where debug and release builds have
+different suffixes.
+
+Fixes QTBUG-75468
+---
+ qmake/generators/makefile.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
+index b634ec622b..761212ebec 100644
+--- a/qmake/generators/makefile.cpp
++++ b/qmake/generators/makefile.cpp
+@@ -3244,6 +3244,8 @@ MakefileGenerator::pkgConfigFileName(bool fixify)
+         if (dot != -1)
+             ret = ret.left(dot);
+     }
++    if (project->isActiveConfig("debug") && project->isActiveConfig("win32"))
++        ret += "d";
+     ret += Option::pkgcfg_ext;
+     QString subdir = project->first("QMAKE_PKGCONFIG_DESTDIR").toQString();
+     if(!subdir.isEmpty()) {
+-- 
+2.19.1.windows.1
+
diff --git a/contrib/src/qt/rules.mak b/contrib/src/qt/rules.mak
index 13c63562e0..c40dd1e06d 100644
--- a/contrib/src/qt/rules.mak
+++ b/contrib/src/qt/rules.mak
@@ -39,6 +39,8 @@ endif
 
 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
 	$(MOVE)
 
 QT_OPENGL := -no-opengl
-- 
2.26.2



More information about the vlc-devel mailing list