[vlc-commits] contrib: qt: generate different pkg-config files for debug and release targets
Steve Lhomme
git at videolan.org
Tue Apr 30 10:26:56 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Apr 29 15:53:44 2019 +0200| [bcd65246079919849daf49751cce37ee9535ee33] | committer: Steve Lhomme
contrib: qt: generate different pkg-config files for debug and release targets
Fixes QTBUG-75468
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bcd65246079919849daf49751cce37ee9535ee33
---
...fferent-pkg-config-files-for-debug-and-re.patch | 34 ++++++++++++++++++++++
contrib/src/qt/rules.mak | 2 ++
2 files changed, 36 insertions(+)
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 f0dd9bf084..8588e11631 100644
--- a/contrib/src/qt/rules.mak
+++ b/contrib/src/qt/rules.mak
@@ -49,6 +49,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)
More information about the vlc-commits
mailing list