summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qmake/generators/unix/unixmake.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index da4bbb7..c26fcb4 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -636,11 +636,13 @@ UnixMakefileGenerator::processPrlFiles()
if(opt.startsWith("-L") ||
(Option::target_mode == Option::TARG_MACX_MODE && opt.startsWith("-F"))) {
- if(lit == 0 || !lflags[arch].contains(opt))
+ if(!lflags[arch].contains(opt))
lflags[arch].append(opt);
} else if(opt.startsWith("-l")) {
- if(lit == l.size()-1 || !lflags[arch].contains(opt))
- lflags[arch].append(opt);
+ // Make sure we keep the dependency-order of libraries
+ if (lflags[arch].contains(opt))
+ lflags[arch].removeAll(opt);
+ lflags[arch].append(opt);
} else if(Option::target_mode == Option::TARG_MACX_MODE && opt.startsWith("-framework")) {
if(opt.length() > 11)
opt = opt.mid(11);
@@ -672,7 +674,7 @@ UnixMakefileGenerator::processPrlFiles()
lflags[arch].append(opt);
}
} else if(!opt.isNull()) {
- if(lit == 0 || l.lastIndexOf(opt, lit-1) == -1)
+ if(!lflags[arch].contains(opt))
lflags[arch].append(opt);
}
}