From 2634ba5b4da5e315f4b0d396d8f8ab3cc48d9c8e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 19 Dec 2018 18:18:24 +0100 Subject: 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 --- qmake/generators/unix/unixmake.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'qmake/generators/unix/unixmake.cpp') 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); } -- cgit v1.2.3