From 3018c48f32120b59a72120068f4f99a1f5647e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 27 Sep 2019 15:07:58 +0200 Subject: [PATCH] qmake: Parse -framework link lines the same way the linker does MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [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 Reviewed-by: Alexandru Croitor Reviewed-by: Tor Arne Vestbø --- qmake/generators/unix/unixmake.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 71bf72100e3..f4bc0e47ead 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;