summaryrefslogtreecommitdiffstats
path: root/mkspecs/macx-ios-clang
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-11-21 13:44:26 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-11-21 13:44:26 +0100
commit245acbf6e81518958228d295bdb6a64298b09351 (patch)
tree10a78831737274c2c55480437e60c74c884fde4d /mkspecs/macx-ios-clang
parenteb466b636b97251d273aedddfe66b15fe994d375 (diff)
parent087aa1f3cb5975ef55e42db54487f737c93a4f0f (diff)
Merge remote-tracking branch 'origin/5.4.0' into 5.4
Diffstat (limited to 'mkspecs/macx-ios-clang')
-rwxr-xr-xmkspecs/macx-ios-clang/Info.plist.app2
-rw-r--r--mkspecs/macx-ios-clang/LaunchScreen.xib45
-rw-r--r--mkspecs/macx-ios-clang/features/default_post.prf30
-rw-r--r--mkspecs/macx-ios-clang/features/qt.prf6
-rw-r--r--mkspecs/macx-ios-clang/features/qt_config.prf4
-rw-r--r--mkspecs/macx-ios-clang/qmake.conf4
-rwxr-xr-xmkspecs/macx-ios-clang/rename_main.sh10
7 files changed, 88 insertions, 13 deletions
diff --git a/mkspecs/macx-ios-clang/Info.plist.app b/mkspecs/macx-ios-clang/Info.plist.app
index 2987804e33..623ed496c5 100755
--- a/mkspecs/macx-ios-clang/Info.plist.app
+++ b/mkspecs/macx-ios-clang/Info.plist.app
@@ -24,6 +24,8 @@
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
+ <key>UILaunchStoryboardName</key>
+ <string>LaunchScreen</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
diff --git a/mkspecs/macx-ios-clang/LaunchScreen.xib b/mkspecs/macx-ios-clang/LaunchScreen.xib
new file mode 100644
index 0000000000..d28c06b375
--- /dev/null
+++ b/mkspecs/macx-ios-clang/LaunchScreen.xib
@@ -0,0 +1,45 @@
+<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>
+<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"3.0\" toolsVersion=\"6250\" systemVersion=\"14A343f\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\">
+ <dependencies>
+ <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"6244\"/>
+ <capability name=\"Constraints with non-1.0 multipliers\" minToolsVersion=\"5.1\"/>
+ </dependencies>
+ <objects>
+ <placeholder placeholderIdentifier=\"IBFilesOwner\" id=\"-1\" userLabel=\"File\'s Owner\"/>
+ <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"-2\" customClass=\"UIResponder\"/>
+ <view contentMode=\"scaleToFill\" id=\"iN0-l3-epB\">
+ <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"480\" height=\"480\"/>
+ <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>
+ <subviews>
+ <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" misplaced=\"YES\" text=\"\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"9\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"8ie-xW-0ye\">
+ <rect key=\"frame\" x=\"20\" y=\"439\" width=\"441\" height=\"21\"/>
+ <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>
+ <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>
+ <nil key=\"highlightedColor\"/>
+ <variation key=\"widthClass=compact\">
+ <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"11\"/>
+ </variation>
+ </label>
+ <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"$$TARGET\"
+ textAlignment=\"center\" lineBreakMode=\"middleTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"18\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"kId-c2-rCX\">
+ <rect key=\"frame\" x=\"20\" y=\"140\" width=\"441\" height=\"43\"/>
+ <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"36\"/>
+ <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>
+ <nil key=\"highlightedColor\"/>
+ </label>
+ </subviews>
+ <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"calibratedWhite\"/>
+ <constraints>
+ <constraint firstItem=\"kId-c2-rCX\" firstAttribute=\"centerY\" secondItem=\"iN0-l3-epB\" secondAttribute=\"bottom\" multiplier=\"1/3\" constant=\"1\" id=\"Kid-kn-2rF\"/>
+ <constraint firstAttribute=\"centerX\" secondItem=\"kId-c2-rCX\" secondAttribute=\"centerX\" id=\"Koa-jz-hwk\"/>
+ <constraint firstAttribute=\"bottom\" secondItem=\"8ie-xW-0ye\" secondAttribute=\"bottom\" constant=\"20\" id=\"Kzo-t9-V3l\"/>
+ <constraint firstItem=\"8ie-xW-0ye\" firstAttribute=\"leading\" secondItem=\"iN0-l3-epB\" secondAttribute=\"leading\" constant=\"20\" symbolic=\"YES\" id=\"MfP-vx-nX0\"/>
+ <constraint firstAttribute=\"centerX\" secondItem=\"8ie-xW-0ye\" secondAttribute=\"centerX\" id=\"ZEH-qu-HZ9\"/>
+ <constraint firstItem=\"kId-c2-rCX\" firstAttribute=\"leading\" secondItem=\"iN0-l3-epB\" secondAttribute=\"leading\" constant=\"20\" symbolic=\"YES\" id=\"fvb-Df-36g\"/>
+ </constraints>
+ <nil key=\"simulatedStatusBarMetrics\"/>
+ <freeformSimulatedSizeMetrics key=\"simulatedDestinationMetrics\"/>
+ <point key=\"canvasLocation\" x=\"404\" y=\"445\"/>
+ </view>
+ </objects>
+</document>
diff --git a/mkspecs/macx-ios-clang/features/default_post.prf b/mkspecs/macx-ios-clang/features/default_post.prf
index 2001f53ec4..643a17e23e 100644
--- a/mkspecs/macx-ios-clang/features/default_post.prf
+++ b/mkspecs/macx-ios-clang/features/default_post.prf
@@ -184,6 +184,14 @@ macx-xcode {
QMAKE_SUBSTITUTES += copy_image
launch_images.files = $$copy_image.output
QMAKE_BUNDLE_DATA += launch_images
+
+ # Set up default LaunchScreen to support iPhone6/6+
+ launch_screen = LaunchScreen.xib
+ copy_launch_screen.input = $$QMAKESPEC/$$launch_screen
+ copy_launch_screen.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$launch_screen
+ QMAKE_SUBSTITUTES += copy_launch_screen
+ launch_screens.files = $$copy_launch_screen.output
+ QMAKE_BUNDLE_DATA += launch_screens
}
macx-xcode {
@@ -193,22 +201,32 @@ macx-xcode {
arch_iphonesimulator.value = $$QMAKE_IOS_SIMULATOR_ARCHS
QMAKE_MAC_XCODE_SETTINGS += arch_iphoneos arch_iphonesimulator
- unset(QMAKE_XCODE_ARCHS)
+ QMAKE_XCODE_ARCHS = $$QMAKE_IOS_DEVICE_ARCHS $$QMAKE_IOS_SIMULATOR_ARCHS
+
+ only_active_arch.name = ONLY_ACTIVE_ARCH
+ only_active_arch.value = YES
+ only_active_arch.build = debug
+ QMAKE_MAC_XCODE_SETTINGS += only_active_arch
} else {
# Be more specific about which architecture we're targeting
contains(QT_ARCH, arm.*): \
- actual_archs = $$QMAKE_IOS_DEVICE_ARCHS
+ VALID_ARCHS = $$QMAKE_IOS_DEVICE_ARCHS
else: \
- actual_archs = $$QMAKE_IOS_SIMULATOR_ARCHS
+ VALID_ARCHS = $$QMAKE_IOS_SIMULATOR_ARCHS
+
+ single_arch: VALID_ARCHS = $$first(VALID_ARCHS)
+
+ ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS))
+ ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ACTIVE_ARCHS), $(EXPORT_ACTIVE_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch))
+
+ QMAKE_EXTRA_VARIABLES += VALID_ARCHS ACTIVE_ARCHS ARCH_ARGS
- for(arch, actual_archs): \
- arch_flags += -arch $$arch
+ arch_flags = $(EXPORT_ARCH_ARGS)
QMAKE_CFLAGS += $$arch_flags
QMAKE_CXXFLAGS += $$arch_flags
QMAKE_OBJECTIVE_CFLAGS += $$arch_flags
QMAKE_LFLAGS += $$arch_flags
}
-unset(actual_archs)
load(default_post)
diff --git a/mkspecs/macx-ios-clang/features/qt.prf b/mkspecs/macx-ios-clang/features/qt.prf
index a5b00377ee..7ca3198dbe 100644
--- a/mkspecs/macx-ios-clang/features/qt.prf
+++ b/mkspecs/macx-ios-clang/features/qt.prf
@@ -32,17 +32,19 @@ equals(TEMPLATE, app):contains(QT, gui(-private)?) {
# called 'qt_main' now.
macx-xcode {
- objects_dir = "${OBJECT_FILE_DIR}-${CURRENT_VARIANT}/${CURRENT_ARCH}"
+ objects_dir = "${OBJECT_FILE_DIR}-${CURRENT_VARIANT}"
+ archs = "${ARCHS}"
} else {
objects_dir = $$OBJECTS_DIR
isEmpty(objects_dir): \
objects_dir = .
+ archs = "$$QMAKE_IOS_DEVICE_ARCHS $$QMAKE_IOS_SIMULATOR_ARCHS"
}
!isEmpty(QMAKE_PRE_LINK): \
QMAKE_PRE_LINK += ";"
- QMAKE_PRE_LINK += $$QMAKESPEC/rename_main.sh $${objects_dir}
+ QMAKE_PRE_LINK += $$QMAKESPEC/rename_main.sh $${objects_dir} \"$${archs}\"
}
}
diff --git a/mkspecs/macx-ios-clang/features/qt_config.prf b/mkspecs/macx-ios-clang/features/qt_config.prf
index d9a13f65eb..d1a1a36933 100644
--- a/mkspecs/macx-ios-clang/features/qt_config.prf
+++ b/mkspecs/macx-ios-clang/features/qt_config.prf
@@ -9,4 +9,8 @@ isEmpty(QT_ARCH) {
QT_ARCH = arm
else: \ # Simulator
QT_ARCH = i386
+
+ # Prevent the arch/config tests from building as multi-arch binaries,
+ # as we only want the lowest common denominator features.
+ CONFIG += single_arch
}
diff --git a/mkspecs/macx-ios-clang/qmake.conf b/mkspecs/macx-ios-clang/qmake.conf
index 7b2e7a17e7..0c083edf80 100644
--- a/mkspecs/macx-ios-clang/qmake.conf
+++ b/mkspecs/macx-ios-clang/qmake.conf
@@ -15,8 +15,8 @@ DEFINES += DARWIN_NO_CARBON QT_NO_PRINTER QT_NO_PRINTDIALOG
# Universal target (iPhone and iPad)
QMAKE_IOS_TARGETED_DEVICE_FAMILY = 1,2
-QMAKE_IOS_DEVICE_ARCHS = armv7
-QMAKE_IOS_SIMULATOR_ARCHS = i386
+QMAKE_IOS_DEVICE_ARCHS = armv7 arm64
+QMAKE_IOS_SIMULATOR_ARCHS = i386 x86_64
include(../common/ios.conf)
include(../common/gcc-base-mac.conf)
diff --git a/mkspecs/macx-ios-clang/rename_main.sh b/mkspecs/macx-ios-clang/rename_main.sh
index b1321e855e..040140b7ee 100755
--- a/mkspecs/macx-ios-clang/rename_main.sh
+++ b/mkspecs/macx-ios-clang/rename_main.sh
@@ -41,10 +41,14 @@
##
#############################################################################
-if [ $# -eq 0 ]; then
- echo "usage: $0 <path to object files>"
+if [ $# -ne 2 ]; then
+ echo "$0: wrong number of arguments for internal tool used by iOS mkspec"
else
- for f in $(find $1 -name '*.o'); do
+ arch_paths=""
+ for a in $2; do
+ arch_paths="$arch_paths $1/$a"
+ done
+ for f in $(find $arch_paths -name '*.o'); do
# Skip object files without the _main symbol
nm $f 2>/dev/null | grep -q 'T _main$' || continue