summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2018-12-19 18:18:24 +0100
committerOswald Buddenhagen <oswald.buddenhagen@gmx.de>2019-02-14 19:29:48 +0000
commit2634ba5b4da5e315f4b0d396d8f8ab3cc48d9c8e (patch)
treeffc4757c26c8474da0237b35b6f8a027d0a44dc9 /qmake
parent501cca2c4b0851cea7133ba56c3a05d71c25ce6d (diff)
qmake: don't mess up linking order of frameworks
make it "last one wins", consistently with regular libraries. this isn't really relevant in qmake, because the order matters only for static frameworks, which qmake defines out of existence. note that specifying frameworks by full path does not work, so we don't need to amend 9d76beee5 in that regard. Change-Id: Ib027109339e1b5973c577d69906b6daf83ba9611 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/unix/unixmake.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index 4cbe06d9dc..7f42fbe09e 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -506,17 +506,14 @@ UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
if (opt.startsWith("-Xarch"))
opt = l.at(++lit); // The user has done the right thing and prefixed each part
}
- bool found = false;
for(int x = 0; x < lflags[arch].size(); ++x) {
if (lflags[arch].at(x) == "-framework" && lflags[arch].at(++x) == opt) {
- found = true;
+ lflags[arch].remove(x - 1, 2);
break;
}
}
- if(!found) {
- lflags[arch].append("-framework");
- lflags[arch].append(opt);
- }
+ lflags[arch].append("-framework");
+ lflags[arch].append(opt);
} else {
lflags[arch].append(opt);
}