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>
bb10
Jake Petroules 2016-01-26 08:59:24 -08:00
parent b64a94516b
commit c4ecb81d6d
2 changed files with 11 additions and 1 deletions

View File

@ -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

View File

@ -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) {