path: root/mkspecs
diff options
authorTor Arne Vestbø <>2012-11-23 13:26:50 +0100
committerTor Arne Vestbø <>2013-02-27 13:07:21 +0100
commit77168c03ffb2d8eeef231766e4322601495778c9 (patch)
treee6ba8cc74b4a745eb440b752630381026769bd80 /mkspecs
parentc3278e33534fe937fe367dfbf648282ceba68c7f (diff)
iOS: Make Xcode output the default for GUI applications
As long as Qt Creator does not provide any iOS integration, and the app bundle we create using the Makefile generator is not good enough to deploy to a device anyways, producing Xcode projects make the most sense. We base the decicion on whether or not the project depends on QtGui and has app_bundles enabled. This prevents configure tests and other tools from having Xcode projects, but allows examples and demos to build out of the box. Instead of setting the generator unconditionally we unset it in default_pre so that we can detect if the user set it manually. This means the user won't be able to inspect the MAKEFILE_GENERATOR variable from the pro file, but this is less of a use-case then overriding the generator from the command line or prooject file. Change-Id: I881cf3e29631445f83ea4ff0979f7a566e4810f5 Reviewed-by: Morten Johan Sørvig <> Reviewed-by: Richard Moe Gustavsen <>
Diffstat (limited to 'mkspecs')
3 files changed, 20 insertions, 3 deletions
diff --git a/mkspecs/common/ios.conf b/mkspecs/common/ios.conf
index 0d68d37ff8..4c1c1f093d 100644
--- a/mkspecs/common/ios.conf
+++ b/mkspecs/common/ios.conf
@@ -3,11 +3,11 @@
-CONFIG += ios reduce_exports incremental global_init_link_order lib_version_first plugin_no_soname sdk
+CONFIG += app_bundle reduce_exports incremental global_init_link_order lib_version_first plugin_no_soname sdk
-# Qt can't build iOS app bundle :(
-CONFIG -= app_bundle
+# FIXME: Transform ios.conf to follow the same inheritance pattern as eg mac.conf and unix.conf
# Not deploying to Mac OSX
diff --git a/mkspecs/features/ios/default_post.prf b/mkspecs/features/ios/default_post.prf
new file mode 100644
index 0000000000..3e9d12be3b
--- /dev/null
+++ b/mkspecs/features/ios/default_post.prf
@@ -0,0 +1,13 @@
+CONFIG(qt):contains(QT, gui):equals(TEMPLATE, app): CONFIG += gui_app
+ gui_app:app_bundle: \
+ # For applications we want Xcode project files
+ else: \
+ # For libs, etc we still want regular Makefiles
diff --git a/mkspecs/features/ios/default_pre.prf b/mkspecs/features/ios/default_pre.prf
new file mode 100644
index 0000000000..e2956bd77d
--- /dev/null
+++ b/mkspecs/features/ios/default_pre.prf
@@ -0,0 +1,4 @@
+# Unset makefile generator, so we can auto-detect value in default_post