diff options
-rw-r--r-- | qmake/generators/makefile.cpp | 6 | ||||
-rw-r--r-- | qmake/generators/makefile.h | 2 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake.cpp | 12 | ||||
-rw-r--r-- | qmake/generators/win32/winmakefile.cpp | 6 |
4 files changed, 13 insertions, 13 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index e7b7a7a10e..d422dfe4c2 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -876,19 +876,19 @@ MakefileGenerator::init() } bool -MakefileGenerator::processPrlFile(QString &file) +MakefileGenerator::processPrlFile(QString &file, bool baseOnly) { bool try_replace_file = false; QString f = fileFixify(file, FileFixifyBackwards); QString meta_file; - if (f.endsWith(Option::prl_ext)) { + if (!baseOnly && f.endsWith(Option::prl_ext)) { meta_file = QMakeMetaInfo::checkLib(f); try_replace_file = true; } else { meta_file = QMakeMetaInfo::checkLib(f + Option::prl_ext); if (!meta_file.isEmpty()) { try_replace_file = true; - } else { + } else if (!baseOnly) { int ext = f.lastIndexOf('.'); if (ext != -1) meta_file = QMakeMetaInfo::checkLib(f.left(ext) + Option::prl_ext); diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index f32bec650e..6694a77841 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -198,7 +198,7 @@ protected: //for prl QString prlFileName(bool fixify=true); void writePrlFile(); - bool processPrlFile(QString &); + bool processPrlFile(QString &, bool baseOnly); virtual void writePrlFile(QTextStream &); //make sure libraries are found diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 894020d2bd..52d34ef513 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -443,7 +443,7 @@ UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) dep_it != libdirs.end(); ++dep_it) { QString libBase = (*dep_it).local() + '/' + project->first("QMAKE_PREFIX_SHLIB") + lib; - if (linkPrl && processPrlFile(libBase)) + if (linkPrl && processPrlFile(libBase, true)) goto found; for (ProStringList::Iterator extit = extens.begin(); extit != extens.end(); ++extit) { if (exists(libBase + '.' + (*extit))) @@ -471,12 +471,12 @@ UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) } for (const QMakeLocalFileName &dir : qAsConst(frameworkdirs)) { QString frameworkDirectory = dir.local() + "/" + frameworkName + + ".framework/"; - QString suffixedPrl = frameworkDirectory + opt + Option::prl_ext; - if (processPrlFile(suffixedPrl)) + QString suffixedPrl = frameworkDirectory + opt; + if (processPrlFile(suffixedPrl, true)) break; if (hasSuffix) { - QString unsuffixedPrl = frameworkDirectory + frameworkName + Option::prl_ext; - if (processPrlFile(unsuffixedPrl)) + QString unsuffixedPrl = frameworkDirectory + frameworkName; + if (processPrlFile(unsuffixedPrl, true)) break; } } @@ -487,7 +487,7 @@ UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) } } } else if (linkPrl) { - processPrlFile(opt); + processPrlFile(opt, false); } ProStringList &prl_libs = project->values("QMAKE_CURRENT_PRL_LIBS"); diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index bca27b7044..b7c2719c1f 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -106,7 +106,7 @@ Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) for (QList<QMakeLocalFileName>::Iterator dir_it = dirs.begin(); dir_it != dirs.end(); ++dir_it) { QString cand = (*dir_it).real() + Option::dir_sep + lib; - if (linkPrl && processPrlFile(cand)) { + if (linkPrl && processPrlFile(cand, true)) { (*it) = cand; goto found; } @@ -124,13 +124,13 @@ Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) } else if (linkPrl && type == LibFlagFile) { QString lib = opt.toQString(); if (fileInfo(lib).isAbsolute()) { - if (processPrlFile(lib)) + if (processPrlFile(lib, false)) (*it) = lib; } else { for (QList<QMakeLocalFileName>::Iterator dir_it = dirs.begin(); dir_it != dirs.end(); ++dir_it) { QString cand = (*dir_it).real() + Option::dir_sep + lib; - if (processPrlFile(cand)) { + if (processPrlFile(cand, false)) { (*it) = cand; break; } |