From 3964b683f849baade1576ea2f50aab631970df58 Mon Sep 17 00:00:00 2001 From: Martin Afanasjew Date: Sun, 27 Sep 2015 14:39:06 +0200 Subject: 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 --- qmake/generators/makefile.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 4a03fafd77..7d4026c292 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -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} "; -- cgit v1.2.3