summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/ios/default_post.prf
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs/features/ios/default_post.prf')
-rw-r--r--mkspecs/features/ios/default_post.prf35
1 files changed, 19 insertions, 16 deletions
diff --git a/mkspecs/features/ios/default_post.prf b/mkspecs/features/ios/default_post.prf
index e9d2149351..e55228ed4a 100644
--- a/mkspecs/features/ios/default_post.prf
+++ b/mkspecs/features/ios/default_post.prf
@@ -18,7 +18,7 @@ gui_app {
# linker have seen a use for so far. We need this because we load the platform
# plugin from the platform plugin itself, using Q_IMPORT_PLUGIN.
lib_path_and_base = $$[QT_INSTALL_PLUGINS/get]/platforms/libqios$$qtPlatformTargetSuffix()
- LIBS += "-force_load $${lib_path_and_base}.$${QMAKE_EXTENSION_STATICLIB}"
+ LIBS += -Wl,-force_load,$${lib_path_and_base}.$${QMAKE_EXTENSION_STATICLIB}
LIBS += $$fromfile($${lib_path_and_base}.prl, QMAKE_PRL_LIBS)
# Which means we don't want the auto-generated import for the platform plugin
@@ -46,24 +46,27 @@ isEmpty(QT_ARCH) {
# but we fail to pick up the architecture since we're not passing -arch
# yet. Xcode does not seem to have a way to run the shared toolchain
# in a way that will automatically do this (for example xcrun -sdk).
- contains(QMAKE_MAC_SDK, iphoneos.*): QT_ARCH = armv7
+ contains(QMAKE_MAC_SDK, iphoneos.*): QT_ARCH = arm
else: QT_ARCH = i386 # Simulator
-} else {
- # Fix up the QT_ARCH to be more specific
- equals(QT_ARCH, arm) {
- # Samsung S5PC100, Apple A4, A5, A5X
- QT_ARCH = armv7
-
- # FIXME: How do we support armv7s when Qt can't do universal builds?
- }
}
-!equals(MAKEFILE_GENERATOR, XCODE) {
- arch_flag = -arch $$QT_ARCH
- QMAKE_CFLAGS += $$arch_flag
- QMAKE_CXXFLAGS += $$arch_flag
- QMAKE_OBJECTIVE_CFLAGS += $$arch_flag
- QMAKE_LFLAGS += $$arch_flag
+# Be more specific about which architecture we're targeting
+equals(QT_ARCH, arm): \
+ actual_archs = armv7
+else: \
+ actual_archs = $$QT_ARCH
+
+equals(MAKEFILE_GENERATOR, XCODE) {
+ QMAKE_XCODE_ARCHS = $$actual_archs
+} else {
+ for(arch, actual_archs): \
+ arch_flags += -arch $$arch
+
+ QMAKE_CFLAGS += $$arch_flags
+ QMAKE_CXXFLAGS += $$arch_flags
+ QMAKE_OBJECTIVE_CFLAGS += $$arch_flags
+ QMAKE_LFLAGS += $$arch_flags
}
+unset(actual_archs)
load(default_post)