diff options
-rw-r--r-- | qmake/generators/unix/unixmake.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 3b6e87a2b6..d7c9413290 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -498,17 +498,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 == "-framework") { + } 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); |