diff options
author | Jake Petroules <jake.petroules@theqtcompany.com> | 2016-01-26 08:59:24 -0800 |
---|---|---|
committer | Jake Petroules <jake.petroules@theqtcompany.com> | 2016-02-06 03:18:45 +0000 |
commit | c4ecb81d6d64a190f7d24222d8cf35d953e73c1e (patch) | |
tree | 45bb2e9f6a0e7a122be5504d858c893e0f91d81e /mkspecs | |
parent | b64a94516b7c789fd36a7a2d4a7ecec10c3bfe17 (diff) |
Fix shared library framework builds of Qt with a platform suffix.
This is necessary for combined device and simulator builds on Apple
platforms (iOS, tvOS, watchOS) to link properly.
Change-Id: I21e70806643b10f429945d3020995dc94fa5c612
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/qt.prf | 2 | ||||
-rw-r--r-- | mkspecs/features/qt_functions.prf | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index 4b40451c96..b53617ba2a 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -122,7 +122,7 @@ for(ever) { QMAKE_FRAMEWORKPATH *= $$MODULE_FRAMEWORKS !isEmpty(MODULE_MODULE) { contains(MODULE_CONFIG, lib_bundle) { - LIBS$$var_sfx += -framework $$MODULE_MODULE + LIBS$$var_sfx += -framework $${MODULE_MODULE}$$qtFrameworkPlatformTargetSuffix() } else { !isEmpty(MODULE_LIBS_ADD): \ LIBS$$var_sfx += -L$$MODULE_LIBS_ADD diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index b2c2507807..88467e89ba 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -13,6 +13,16 @@ defineReplace(qtPlatformTargetSuffix) { return($$suffix) } +# suffix for the -framework linker flag when the exectuable's name +# differs from the bundle's, for example -framework QtCore,_debug +# links to QtCore.framework/QtCore_debug +defineReplace(qtFrameworkPlatformTargetSuffix) { + suffix = $$qtPlatformTargetSuffix() + !isEmpty(suffix): \ + suffix = ,$$suffix + return($$suffix) +} + defineReplace(qtLibraryTarget) { LIBRARY_NAME = $$1 CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) { |