The LIBS statement generated into Makefiles contained duplicate
libraries when application was linking static libraries.
Fixed by adapting the logic from unixmake.cpp's version of
processPrlFiles() to remove duplicates.
Change-Id: I12e152900233d0376b7d7ac6cd18a92850a6d640
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
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;
+ }
}
}