diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-03-09 01:00:54 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-03-09 01:00:55 +0100 |
commit | 261c0dedac1d97b5960d27eedaa017d45050b654 (patch) | |
tree | f91c8e2a770f4c456f6465f28aecefc8c2bbeccf /qmake | |
parent | 830e06a3f8173621a99426e7da6ad9704eb701b3 (diff) | |
parent | caa74f16d41ebe65e1edbea219f799cf246d6067 (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I056b658ffe9390dfcbe2787e2bddc7f4e9b389dd
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/win32/winmakefile.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index a855fcd0a5..16f9361d13 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -84,6 +84,7 @@ Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) if (impexts.isEmpty()) impexts = project->values("QMAKE_EXTENSION_STATICLIB"); QList<QMakeLocalFileName> dirs; + int libidx = 0; for (const ProString &dlib : project->values("QMAKE_DEFAULT_LIBDIRS")) dirs.append(QMakeLocalFileName(dlib.toQString())); static const char * const lflags[] = { "LIBS", "LIBS_PRIVATE", @@ -96,11 +97,12 @@ Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) LibFlagType type = parseLibFlag(opt, &arg); if (type == LibFlagPath) { QMakeLocalFileName lp(arg.toQString()); - if (dirs.contains(lp)) { + int idx = dirs.indexOf(lp); + if (idx >= 0 && idx < libidx) { it = l.erase(it); continue; } - dirs.append(lp); + dirs.insert(libidx++, lp); (*it) = "-L" + lp.real(); } else if (type == LibFlagLib) { QString lib = arg.toQString(); |