diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-06-28 17:57:53 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-07-16 15:44:37 +0000 |
commit | 7a33f49e15fd5bd1e5f599f85179b15a90a1684d (patch) | |
tree | 418a20b55719c6e717fe03ddf0d5e09072a3d957 /qmake/generators/win32/winmakefile.cpp | |
parent | dcb3a13fa037897322c3905903db9e4c98717501 (diff) |
qmake: fix lookup of .prl files for libs specified by full filename
under windows, libraries can have a numeric suffix derived from VERSION,
and (under MinGW) a unix-like "lib" prefix - neither of which .prl files
have. therefore, we had to make the back-mapping from the library to the
.prl file reverse-engineer the original TARGET's name. we verify whether
we actually got the right file by comparing the target specified inside
the .prl file with what we started from.
this fixes linking of transitive deps of static deps.
the alternative of changing the .prl naming pattern to avoid the
back-mapping was discarded, as a) it would be backwards incompatible and
b) it would break project-internal -lfoo references to versioned libs.
Change-Id: Ia9b899fe6a5700fee528bd1dacf130caf083cdd6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'qmake/generators/win32/winmakefile.cpp')
-rw-r--r-- | qmake/generators/win32/winmakefile.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index b7c2719c1f..a1adc2de58 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -163,6 +163,23 @@ Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) return true; } +bool Win32MakefileGenerator::processPrlFileBase(QString &origFile, const QStringRef &origName, + const QStringRef &fixedBase, int slashOff) +{ + if (MakefileGenerator::processPrlFileBase(origFile, origName, fixedBase, slashOff)) + return true; + for (int off = fixedBase.length(); off > slashOff; off--) { + if (!fixedBase.at(off - 1).isDigit()) { + if (off != fixedBase.length()) { + return MakefileGenerator::processPrlFileBase( + origFile, origName, fixedBase.left(off), slashOff); + } + break; + } + } + return false; +} + void Win32MakefileGenerator::processVars() { if (project->first("TEMPLATE").endsWith("aux")) |