From 536b25b3759d46724ec5957868206c1408233d1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 26 Jun 2013 16:47:20 +0200 Subject: iOS: Move platform plugin linking logic into iOS-specific qt.prf Change-Id: I54350c8df3fe4bf20fc59cd42a28458018664eef Reviewed-by: Oswald Buddenhagen --- mkspecs/features/ios/default_post.prf | 22 ---------------------- mkspecs/features/ios/qt.prf | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 22 deletions(-) create mode 100644 mkspecs/features/ios/qt.prf diff --git a/mkspecs/features/ios/default_post.prf b/mkspecs/features/ios/default_post.prf index fea5aea44d..abd82b955a 100644 --- a/mkspecs/features/ios/default_post.prf +++ b/mkspecs/features/ios/default_post.prf @@ -10,28 +10,6 @@ isEmpty(MAKEFILE_GENERATOR) { MAKEFILE_GENERATOR = UNIX } -gui_app { - LIBS *= -L$$[QT_INSTALL_PLUGINS/get]/platforms - - lib_name = qios - lib_path_and_base = $$[QT_INSTALL_PLUGINS/get]/platforms/lib$${lib_name}$$qtPlatformTargetSuffix() - LIBS += -l$${lib_name}$$qtPlatformTargetSuffix() $$fromfile($${lib_path_and_base}.prl, QMAKE_PRL_LIBS) - - # By marking qt_registerPlatformPlugin as undefined, we ensure that - # the plugin.o translation unit is considered for inclusion in - # the final binary, which in turn ensures that the plugin's - # static initializer is included and run. - QMAKE_LFLAGS += -u _qt_registerPlatformPlugin - - # We do link and dependency resolution for the platform plugin - # manually, since we know we always need the plugin, so we don't - # need to generate an import for it. - CONFIG -= import_qpa_plugin - - # FIXME: Solve using 'ld -r -alias -unexported_symbol' instead - !no_main_wrapper: DEFINES += main=qt_user_main -} - contains(MAKEFILE_GENERATOR, XCODE) { ios_device_family.name = TARGETED_DEVICE_FAMILY ios_device_family.value = $$QMAKE_IOS_TARGETED_DEVICE_FAMILY diff --git a/mkspecs/features/ios/qt.prf b/mkspecs/features/ios/qt.prf new file mode 100644 index 0000000000..15eaaf8283 --- /dev/null +++ b/mkspecs/features/ios/qt.prf @@ -0,0 +1,24 @@ + +equals(TEMPLATE, app):contains(QT, gui) { + LIBS *= -L$$[QT_INSTALL_PLUGINS/get]/platforms + + lib_name = qios + lib_path_and_base = $$[QT_INSTALL_PLUGINS/get]/platforms/lib$${lib_name}$$qtPlatformTargetSuffix() + LIBS += -l$${lib_name}$$qtPlatformTargetSuffix() $$fromfile($${lib_path_and_base}.prl, QMAKE_PRL_LIBS) + + # By marking qt_registerPlatformPlugin as undefined, we ensure that + # the plugin.o translation unit is considered for inclusion in + # the final binary, which in turn ensures that the plugin's + # static initializer is included and run. + QMAKE_LFLAGS += -u _qt_registerPlatformPlugin + + # We do link and dependency resolution for the platform plugin + # manually, since we know we always need the plugin, so we don't + # need to generate an import for it. + CONFIG -= import_qpa_plugin + + # FIXME: Solve using 'ld -r -alias -unexported_symbol' instead + !no_main_wrapper: DEFINES += main=qt_user_main +} + +load(qt) -- cgit v1.2.3