summarylogtreecommitdiffstats
path: root/0028-Prevent-qmake-from-messing-static-lib-dependencies.patch
blob: 4b5cec1ca299c26445e9fd8c7909cae9c48ad39a (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
34
35
36
37
38
39
40
41
42
43
From 0c03c5c9926209c162c75e14713863be8d3da08a Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Tue, 7 Feb 2017 18:25:28 +0100
Subject: [PATCH 28/33] Prevent qmake from messing static lib dependencies

In particular, it messes resolving cyclic dependency between
static freetype2 and harfbuzz
---
 qmake/generators/unix/unixmake.cpp     | 3 +++
 qmake/generators/win32/winmakefile.cpp | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index 7f42fbe09e..e27428c0f2 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -393,6 +393,9 @@ UnixMakefileGenerator::fixLibFlag(const ProString &lib)
 bool
 UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
 {
+    if(project->isActiveConfig("staticlib")) {
+        return false; // prevent qmake from messing static lib dependencies
+    }
     QList<QMakeLocalFileName> libdirs, frameworkdirs;
     int libidx = 0, fwidx = 0;
     for (const ProString &dlib : project->values("QMAKE_DEFAULT_LIBDIRS"))
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 4f1a4344df..32a1ccbbf9 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -87,6 +87,9 @@ Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
       impexts.append(project->values("QMAKE_EXTENSION_IMPORTLIB"));
       impexts.append(project->values("QMAKE_EXTENSION_STATICLIB"));
     }
+    if(project->isActiveConfig("staticlib")) {
+        return false; // prevent qmake from messing static lib dependencies
+    }
     QList<QMakeLocalFileName> dirs;
     int libidx = 0;
     for (const ProString &dlib : project->values("QMAKE_DEFAULT_LIBDIRS"))
-- 
2.22.0