From 4c26b4863361a442ee692ede0e5ab6a798cd2f00 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Thu, 18 Feb 2016 03:41:15 -0800 Subject: [PATCH] Allow Qt for UIKit to be built as shared libraries and default to it Instead of forcing a static build, configure now respects the -shared flag and defaults to that. [ChangeLog][Important Behavior Changes] Qt for iOS now respects the -shared configure flag, and now defaults to this configuration as with all other platforms. Task-number: QTBUG-42937 Change-Id: I9e7b2de8f7f8ba031c2610ff5ac0858e357424bd Reviewed-by: Oswald Buddenhagen --- configure.json | 2 +- mkspecs/features/uikit/default_pre.prf | 3 +++ src/plugins/platforms/ios/ios.pro | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.json b/configure.json index 9bdc50c05c..9b541a18ff 100644 --- a/configure.json +++ b/configure.json @@ -462,7 +462,7 @@ "features": { "shared": { "label": "Building shared libraries", - "condition": "!config.uikit && !config.integrity", + "condition": "!config.integrity", "output": [ "shared", "publicFeature", diff --git a/mkspecs/features/uikit/default_pre.prf b/mkspecs/features/uikit/default_pre.prf index 8b5b3ccfe9..908828be18 100644 --- a/mkspecs/features/uikit/default_pre.prf +++ b/mkspecs/features/uikit/default_pre.prf @@ -20,3 +20,6 @@ load(default_pre) # Check for supported Xcode versions lessThan(QMAKE_XCODE_VERSION, "4.3"): \ error("This mkspec requires Xcode 4.3 or later") + +ios:shared:lessThan(QMAKE_IOS_DEPLOYMENT_TARGET, "8.0"): \ + QMAKE_IOS_DEPLOYMENT_TARGET = 8.0 diff --git a/src/plugins/platforms/ios/ios.pro b/src/plugins/platforms/ios/ios.pro index 2c85a68f0b..35e4719955 100644 --- a/src/plugins/platforms/ios/ios.pro +++ b/src/plugins/platforms/ios/ios.pro @@ -1,5 +1,10 @@ TARGET = qios +# QTBUG-42937: Work around linker errors caused by circular +# dependencies between the iOS platform plugin and the user +# application's main() when the plugin is a shared library. +qtConfig(shared): CONFIG += static + QT += core-private gui-private platformsupport-private LIBS += -framework Foundation -framework UIKit -framework QuartzCore -framework AudioToolbox