summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/ios/qt.prf
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs/features/ios/qt.prf')
-rw-r--r--mkspecs/features/ios/qt.prf24
1 files changed, 24 insertions, 0 deletions
diff --git a/mkspecs/features/ios/qt.prf b/mkspecs/features/ios/qt.prf
new file mode 100644
index 0000000000..80d4907acd
--- /dev/null
+++ b/mkspecs/features/ios/qt.prf
@@ -0,0 +1,24 @@
+
+equals(TEMPLATE, app):contains(QT, gui(-private)?) {
+ 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)