From 77168c03ffb2d8eeef231766e4322601495778c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 23 Nov 2012 13:26:50 +0100 Subject: iOS: Make Xcode output the default for GUI applications MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- mkspecs/common/ios.conf | 6 +++--- mkspecs/features/ios/default_post.prf | 13 +++++++++++++ mkspecs/features/ios/default_pre.prf | 4 ++++ 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 mkspecs/features/ios/default_post.prf create mode 100644 mkspecs/features/ios/default_pre.prf (limited to 'mkspecs') 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 @@ # MAKEFILE_GENERATOR = UNIX -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 QMAKE_INCREMENTAL_STYLE = sublib -# 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 +QMAKE_PLATFORM = ios $$QMAKE_PLATFORM # Not deploying to Mac OSX QMAKE_MACOSX_DEPLOYMENT_TARGET = 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 + +isEmpty(MAKEFILE_GENERATOR) { + gui_app:app_bundle: \ + # For applications we want Xcode project files + MAKEFILE_GENERATOR = XCODE + else: \ + # For libs, etc we still want regular Makefiles + MAKEFILE_GENERATOR = UNIX +} + +load(default_post) 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 +unset(MAKEFILE_GENERATOR) + +load(default_pre) -- cgit v1.2.3