findLibraries(): don't remove -L options for system paths
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Thu, 2 Aug 2012 10:11:13 +0000 (12:11 +0200)
committerQt by Nokia <qt-info@nokia.com>
Sat, 4 Aug 2012 06:15:18 +0000 (08:15 +0200)
the paths may be explicitly added before some other paths, so it would
be wrong to remove them.

Change-Id: I68ae93fd307afe14a07a0f24de952783950b5bea
Reviewed-by: Holger Freyther <holger+qt@freyther.de>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
qmake/generators/unix/unixmake.cpp

index 31b1d0d..01cfeb4 100644 (file)
@@ -478,7 +478,8 @@ UnixMakefileGenerator::findLibraries()
                 if(opt.startsWith("-L")) {
                     QString lib = opt.mid(2);
                     QMakeLocalFileName f(lib);
-                    if (libdirs.contains(f)) {
+                    int idx = libdirs.indexOf(f);
+                    if (idx >= 0 && idx < libidx) {
                         it = l.erase(it);
                         continue;
                     }