diff options
author | Lars Knoll <lars.knoll@qt.io> | 2019-08-06 12:24:37 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2019-08-07 12:50:28 +0200 |
commit | 05b90be3c5ce4709156178478abb2e7ba125a0be (patch) | |
tree | a7c39b76c99f4887dbc6837be3a41afc7fdb29b4 /qmake/generators/unix/unixmake.cpp | |
parent | 7301e44161d8bb25410219a31405584c9492b83e (diff) | |
parent | 6f357f50b4b72e3c5a6903a09624ade1d72d12c1 (diff) |
Merge "Merge remote-tracking branch 'origin/dev' into wip/qt6"
Diffstat (limited to 'qmake/generators/unix/unixmake.cpp')
-rw-r--r-- | qmake/generators/unix/unixmake.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index ef55af365c..227dc8908a 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -497,21 +497,20 @@ UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) // Make sure we keep the dependency order of libraries lflags[arch].removeAll(opt); lflags[arch].append(opt); - } else if (target_mode == TARG_MAC_MODE && opt.startsWith("-framework")) { - if (opt.length() > 10) { - opt = opt.mid(10).trimmed(); - } else { - opt = l.at(++lit); - if (opt.startsWith("-Xarch")) - opt = l.at(++lit); // The user has done the right thing and prefixed each part - } + } else if (target_mode == TARG_MAC_MODE + && (opt == "-framework" || opt == "-force_load")) { + // Handle space separated options + ProString dashOpt = opt; + opt = l.at(++lit); + if (opt.startsWith("-Xarch")) + opt = l.at(++lit); // The user has done the right thing and prefixed each part for(int x = 0; x < lflags[arch].size(); ++x) { - if (lflags[arch].at(x) == "-framework" && lflags[arch].at(++x) == opt) { + if (lflags[arch].at(x) == dashOpt && lflags[arch].at(++x) == opt) { lflags[arch].remove(x - 1, 2); break; } } - lflags[arch].append("-framework"); + lflags[arch].append(dashOpt); lflags[arch].append(opt); } else { lflags[arch].append(opt); |