diff options
Diffstat (limited to 'qmake/generators/unix')
-rw-r--r-- | qmake/generators/unix/unixmake.cpp | 27 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 11 |
2 files changed, 22 insertions, 16 deletions
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 664c81296c..f4bc0e47ea 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -433,12 +433,9 @@ UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) QMakeLocalFileName f(opt.mid(2)); if (!frameworkdirs.contains(f)) frameworkdirs.insert(fwidx++, f); - } else if (target_mode == TARG_MAC_MODE && opt.startsWith("-framework")) { + } else if (target_mode == TARG_MAC_MODE && opt == "-framework") { if (linkPrl) { - if (opt.length() == 10) - opt = (*++it).toQString(); - else - opt = opt.mid(10).trimmed(); + opt = (*++it).toQString(); static const QChar suffixMarker = ','; const int suffixPosition = opt.indexOf(suffixMarker); const bool hasSuffix = suffixPosition >= 0; @@ -448,15 +445,21 @@ UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) opt.remove(suffixMarker); // Apply suffix by removing marker } for (const QMakeLocalFileName &dir : qAsConst(frameworkdirs)) { + auto processPrlIfFound = [&](QString directory) { + QString suffixedPrl = directory + opt; + if (processPrlFile(suffixedPrl, true)) + return true; + if (hasSuffix) { + QString unsuffixedPrl = directory + frameworkName; + if (processPrlFile(unsuffixedPrl, true)) + return true; + } + return false; + }; QString frameworkDirectory = dir.local() + "/" + frameworkName + + ".framework/"; - QString suffixedPrl = frameworkDirectory + opt; - if (processPrlFile(suffixedPrl, true)) + if (processPrlIfFound(frameworkDirectory + "Resources/") + || processPrlIfFound(frameworkDirectory)) break; - if (hasSuffix) { - QString unsuffixedPrl = frameworkDirectory + frameworkName; - if (processPrlFile(unsuffixedPrl, true)) - break; - } } } else { if (opt.length() == 10) diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 8b4f2bf58f..79d19cae8c 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -1199,8 +1199,10 @@ void UnixMakefileGenerator::init2() project->values("QMAKE_FRAMEWORK_VERSION").append(project->first("VER_MAJ")); if (project->first("TEMPLATE") == "aux") { - project->values("PRL_TARGET") = - project->values("TARGET").first().prepend(project->first("QMAKE_PREFIX_STATICLIB")); + project->values("PRL_TARGET") = { + project->first("QMAKE_PREFIX_STATICLIB") + + project->first("TARGET") + }; } else if (!project->values("QMAKE_APP_FLAG").isEmpty()) { if(!project->isEmpty("QMAKE_BUNDLE")) { ProString bundle_loc = project->first("QMAKE_BUNDLE_LOCATION"); @@ -1228,8 +1230,9 @@ void UnixMakefileGenerator::init2() else ar_cmd.append("$(AR) $(TARGETA) $(OBJECTS)"); if (!project->isEmpty("QMAKE_BUNDLE")) { - project->values("PRL_TARGET").prepend( - project->first("QMAKE_BUNDLE") + Option::dir_sep + project->first("TARGET")); + project->values("PRL_TARGET").prepend(project->first("QMAKE_BUNDLE") + + "/Versions/" + project->first("QMAKE_FRAMEWORK_VERSION") + + "/Resources/" + project->first("TARGET")); ProString bundle_loc = project->first("QMAKE_BUNDLE_LOCATION"); if(!bundle_loc.isEmpty() && !bundle_loc.startsWith("/")) bundle_loc.prepend("/"); |