qmake: Fix prl lookup for suffixed frameworks on Apple platforms

We need to take into account the presence of a possible ',_debug' suffix.

Change-Id: I5655394b78723bbc6cc32e56849acc2366d288e2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
Tor Arne Vestbø 2018-04-18 14:09:12 +02:00
parent 2fe80ed203
commit 070aec28e6

View File

@ -461,10 +461,24 @@ UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
opt = (*++it).toQString();
else
opt = opt.mid(10).trimmed();
static const QChar suffixMarker = ',';
const int suffixPosition = opt.indexOf(suffixMarker);
const bool hasSuffix = suffixPosition >= 0;
QString frameworkName = opt;
if (hasSuffix) {
frameworkName.truncate(suffixPosition);
opt.remove(suffixMarker); // Apply suffix by removing marker
}
for (const QMakeLocalFileName &dir : qAsConst(frameworkdirs)) {
QString prl = dir.local() + "/" + opt + ".framework/" + opt + Option::prl_ext;
if (processPrlFile(prl))
QString frameworkDirectory = dir.local() + "/" + frameworkName + + ".framework/";
QString suffixedPrl = frameworkDirectory + opt + Option::prl_ext;
if (processPrlFile(suffixedPrl))
break;
if (hasSuffix) {
QString unsuffixedPrl = frameworkDirectory + frameworkName + Option::prl_ext;
if (processPrlFile(unsuffixedPrl))
break;
}
}
} else {
if (opt.length() == 10)