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 <morten.sorvig@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>bb10
parent
c3278e3353
commit
77168c03ff
|
|
@ -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 =
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
# Unset makefile generator, so we can auto-detect value in default_post
|
||||
unset(MAKEFILE_GENERATOR)
|
||||
|
||||
load(default_pre)
|
||||
Loading…
Reference in New Issue