From e846edff33ecbd3fc5f4206febc01265ef916d9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 26 Feb 2013 13:36:21 +0100 Subject: [PATCH] iOS: Allow projects to disable the main wrapper In case they provide their own main that calls UIApplicationMain. Change-Id: Ia050277ae5cbcbf01bc57b87ec37a74db9568059 Reviewed-by: Richard Moe Gustavsen --- mkspecs/features/ios/default_post.prf | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/mkspecs/features/ios/default_post.prf b/mkspecs/features/ios/default_post.prf index 6c6d8d89ce..e4221e4b65 100644 --- a/mkspecs/features/ios/default_post.prf +++ b/mkspecs/features/ios/default_post.prf @@ -24,12 +24,14 @@ gui_app { # Which means we don't want the auto-generated import for the platform plugin CONFIG -= import_qpa_plugin - # We link the iosmain library manually as well, since it's not really a plugin - lib_name = qiosmain - lib_path_and_base = $$[QT_INSTALL_PLUGINS/get]/platforms/lib$${lib_name}$$qtPlatformTargetSuffix() - LIBS += -L$$[QT_INSTALL_PLUGINS/get]/platforms -l$${lib_name}$$qtPlatformTargetSuffix() - LIBS += $$fromfile($${lib_path_and_base}.prl, QMAKE_PRL_LIBS) - DEFINES += main=qt_main + !no_main_wrapper { + # We link the iosmain library manually as well, since it's not really a plugin + lib_name = qiosmain + lib_path_and_base = $$[QT_INSTALL_PLUGINS/get]/platforms/lib$${lib_name}$$qtPlatformTargetSuffix() + LIBS += -L$$[QT_INSTALL_PLUGINS/get]/platforms -l$${lib_name}$$qtPlatformTargetSuffix() + LIBS += $$fromfile($${lib_path_and_base}.prl, QMAKE_PRL_LIBS) + DEFINES += main=qt_main + } } load(default_post)