diff options
author | Martin Afanasjew <martin@afanasjew.de> | 2015-09-27 14:39:06 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2015-09-28 13:10:42 +0000 |
commit | 3964b683f849baade1576ea2f50aab631970df58 (patch) | |
tree | 1c41c86baa0f9f361aca645004801bc8961eadee /qmake | |
parent | d24366a63281543e6c1a8e6b615ce882ea6259ab (diff) |
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>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/makefile.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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} "; |