qmake: Fix 'Libs:' line in .pc files on OS X

On OS X with a framework-based build of Qt, the 'Libs:' line of the
.pc files generated by `qmake` references the framework. This requires
two separate arguments to the linker: The fixed string '-framework' and
the name of the framework (e.g. 'QtCore'). Only the latter might need
quoting. Prior to this fix, they were treated as a single argument (e.g.
'-framework QtCore'), thus always quoted because of the contained space,
and later lead to errors when trying to link a Qt framework discovered
via `pkg-config`.

Change-Id: I5c11ee651048832007e2ee4ebcbcf2e3212c8f48
Task-number: QTBUG-47162
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
Martin Afanasjew 2015-09-27 14:39:06 +02:00 committed by Oswald Buddenhagen
parent d24366a632
commit 3964b683f8

View File

@ -3253,7 +3253,8 @@ MakefileGenerator::writePkgConfigFile()
int suffix = bundle.lastIndexOf(".framework");
if (suffix != -1)
bundle = bundle.left(suffix);
pkgConfiglibName = "-framework " + bundle + " ";
t << "-framework ";
pkgConfiglibName = bundle.toQString();
} else {
if (!project->values("QMAKE_DEFAULT_LIBDIRS").contains(libDir))
t << "-L${libdir} ";