summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/ios.prf
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-02-28 18:31:11 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-28 19:22:05 +0100
commit0520631b2ba04fb99d3d46385f04279cd89a7732 (patch)
treec970fab36c889741dedcb708e520fe9ec517fc07 /mkspecs/features/ios.prf
parent439002cddeb32766ea9806ac8b5cf9a973ed0f13 (diff)
parent70d5cb406fda70d175faac5f9588f0e345588c56 (diff)
Merge "Merge branch 'ios' into dev" into refs/staging/dev
Diffstat (limited to 'mkspecs/features/ios.prf')
-rw-r--r--mkspecs/features/ios.prf25
1 files changed, 25 insertions, 0 deletions
diff --git a/mkspecs/features/ios.prf b/mkspecs/features/ios.prf
new file mode 100644
index 0000000000..841378e8dd
--- /dev/null
+++ b/mkspecs/features/ios.prf
@@ -0,0 +1,25 @@
+isEmpty(QT_ARCH) {
+ # The iPhoneOS and iPhoneSimulator targets share the same toolchain,
+ # so when configure runs the arch tests it passes the correct sysroot,
+ # 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
+ 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
+}