summaryrefslogtreecommitdiffstats
path: root/qmake/generators/win32/winmakefile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/generators/win32/winmakefile.cpp')
-rw-r--r--qmake/generators/win32/winmakefile.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 8bd45379d6..2fb1fb952b 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -245,6 +245,23 @@ Win32MakefileGenerator::processPrlFiles()
l.insert(lit + prl + 1, prl_libs.at(prl));
prl_libs.clear();
}
+
+ // Merge them into a logical order
+ if (!project->isActiveConfig("no_smart_library_merge") && !project->isActiveConfig("no_lflags_merge")) {
+ ProStringList lflags;
+ for (int lit = 0; lit < l.size(); ++lit) {
+ ProString opt = l.at(lit).trimmed();
+ if (opt.startsWith(libArg)) {
+ if (!lflags.contains(opt))
+ lflags.append(opt);
+ } else {
+ // Make sure we keep the dependency-order of libraries
+ lflags.removeAll(opt);
+ lflags.append(opt);
+ }
+ }
+ l = lflags;
+ }
}
}