aboutsummarylogtreecommitdiffstats
path: root/0007-Prevent-debug-library-names-in-pkg-config-files.patch
blob: b00a666fe6b803694c577bf5a610300770473266 (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
From 31cca3a47eea50156a5549574d934dd0264cb0f3 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 14:01:14 +0200
Subject: [PATCH 07/34] Prevent debug library names in pkg-config files

qmake generates the pkgconfig .pc files two times, once for the
release build and once for the debug build (which we're not actually
building in this package). For both generations the exact same
pkgconfig file name is used. This causes references to the debug
build ending up in the .pc files which are unwanted
Prevent this from happening by giving the pkgconfig .pc
files for the debug build an unique file name.
---
 qmake/generators/makefile.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 6c614fd868..bd87c5bd6d 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -3164,6 +3164,9 @@ MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir)
         if (dot != -1)
             ret = ret.left(dot);
     }
+    if (project->isActiveConfig("debug")) {
+        ret += "d";
+    }
     ret += Option::pkgcfg_ext;
     QString subdir = project->first("QMAKE_PKGCONFIG_DESTDIR").toQString();
     if(!subdir.isEmpty()) {
-- 
2.18.0