Skip to content

Commit

Permalink
qmake: don't mess up linking order of frameworks
Browse files Browse the repository at this point in the history
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 9d76bee in that regard.

Change-Id: Ib027109339e1b5973c577d69906b6daf83ba9611
Reviewed-by: Joerg Bornemann <[email protected]>
  • Loading branch information
ossilator committed Feb 14, 2019
1 parent 501cca2 commit 2634ba5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions qmake/generators/unix/unixmake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 2634ba5

Please sign in to comment.