qmake: Parse -framework link lines the same way the linker does

[ChangeLog][qmake] The syntax 'LIBS += -frameworkFoo', or
'LIBS += "-framework Foo"' is no longer supported. Use the
canonical 'LIBS += -framework Foo' instead.

Change-Id: I50fd02dbfa155a0b95859734486a92bd448e87c2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Tor Arne Vestbø 2019-09-27 15:07:58 +02:00
parent d3be61d965
commit 3018c48f32

View File

@ -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;