summaryrefslogtreecommitdiffstats
path: root/qmake/generators/unix
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-04-18 14:09:12 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-04-22 17:10:23 +0000
commit070aec28e6e218c4f5fc2e3bb480cfc7684728d2 (patch)
tree97d5f793d4237f2975b774609d10724d821283b7 /qmake/generators/unix
parent2fe80ed203672977e5a00addb224be052bf81cca (diff)
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>
Diffstat (limited to 'qmake/generators/unix')
-rw-r--r--qmake/generators/unix/unixmake.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index 30f99174f8..894020d2bd 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -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)