summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2016-05-19 23:01:59 -0700
committerJake Petroules <jake.petroules@qt.io>2016-08-19 21:05:55 +0000
commit57378a108ca488cbf5cfaa32590fc762dcbf3315 (patch)
tree3a8a3851959f6fc06d0a1c65ac9fa16508e12ee4 /mkspecs
parent2f108fafe98047f9ed2c85c5938579fdeb90682d (diff)
Add support for Apple watchOS
Change-Id: I3f9e00569458a463af2eaa5a3a16a6afd1e9c1ea Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/common/watchos.conf21
-rw-r--r--mkspecs/features/mac/sdk.prf1
-rw-r--r--mkspecs/features/uikit/default_post.prf8
-rw-r--r--mkspecs/features/uikit/default_pre.prf2
-rwxr-xr-xmkspecs/features/uikit/device_destinations.sh4
-rw-r--r--mkspecs/features/uikit/qt.prf2
-rw-r--r--mkspecs/features/uikit/qt_config.prf1
-rw-r--r--mkspecs/features/uikit/xcodebuild.prf4
-rw-r--r--mkspecs/macx-watchos-clang/Info.plist.app35
-rw-r--r--mkspecs/macx-watchos-clang/Info.plist.lib22
-rw-r--r--mkspecs/macx-watchos-clang/qmake.conf21
-rw-r--r--mkspecs/macx-watchos-clang/qplatformdefs.h34
12 files changed, 153 insertions, 2 deletions
diff --git a/mkspecs/common/watchos.conf b/mkspecs/common/watchos.conf
new file mode 100644
index 0000000000..21a408c6b2
--- /dev/null
+++ b/mkspecs/common/watchos.conf
@@ -0,0 +1,21 @@
+#
+# qmake common configuration for watchOS
+#
+
+QMAKE_PLATFORM += watchos
+QMAKE_MAC_SDK = watchos
+CONFIG += bitcode
+
+simulator.sdk = watchsimulator
+simulator.target = simulator
+simulator.dir_affix = $${simulator.sdk}
+simulator.CONFIG = apple$${simulator.sdk}
+simulator.deployment_identifier = watchos-simulator
+
+device.sdk = watchos
+device.target = device
+device.dir_affix = $${device.sdk}
+device.CONFIG = apple$${device.sdk}
+device.deployment_identifier = $${device.sdk}
+
+include(uikit.conf)
diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf
index c4d4c90f09..5abc741b90 100644
--- a/mkspecs/features/mac/sdk.prf
+++ b/mkspecs/features/mac/sdk.prf
@@ -62,6 +62,7 @@ for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_
version_identifier = $$device.deployment_identifier
ios: deployment_target = $$QMAKE_IOS_DEPLOYMENT_TARGET
tvos: deployment_target = $$QMAKE_TVOS_DEPLOYMENT_TARGET
+ watchos: deployment_target = $$QMAKE_WATCHOS_DEPLOYMENT_TARGET
} else: osx {
version_identifier = macosx
deployment_target = $$QMAKE_MACOSX_DEPLOYMENT_TARGET
diff --git a/mkspecs/features/uikit/default_post.prf b/mkspecs/features/uikit/default_post.prf
index 7c92a24556..52c9b1e8c8 100644
--- a/mkspecs/features/uikit/default_post.prf
+++ b/mkspecs/features/uikit/default_post.prf
@@ -22,6 +22,7 @@ macx-xcode {
device_family.name = TARGETED_DEVICE_FAMILY
ios: device_family.value = $$QMAKE_IOS_TARGETED_DEVICE_FAMILY
tvos: device_family.value = $$QMAKE_TVOS_TARGETED_DEVICE_FAMILY
+ watchos: device_family.value = $$QMAKE_WATCHOS_TARGETED_DEVICE_FAMILY
QMAKE_MAC_XCODE_SETTINGS += device_family
ios {
@@ -77,6 +78,11 @@ macx-xcode {
arch_simulator.value = $$QMAKE_TVOS_SIMULATOR_ARCHS
QMAKE_XCODE_ARCHS = $$QMAKE_TVOS_DEVICE_ARCHS $$QMAKE_TVOS_SIMULATOR_ARCHS
}
+ watchos {
+ arch_device.value = $$QMAKE_WATCHOS_DEVICE_ARCHS
+ arch_simulator.value = $$QMAKE_WATCHOS_SIMULATOR_ARCHS
+ QMAKE_XCODE_ARCHS = $$QMAKE_WATCHOS_DEVICE_ARCHS $$QMAKE_WATCHOS_SIMULATOR_ARCHS
+ }
QMAKE_MAC_XCODE_SETTINGS += arch_device arch_simulator
@@ -89,9 +95,11 @@ macx-xcode {
contains(QT_ARCH, arm.*) {
ios: VALID_ARCHS = $$QMAKE_IOS_DEVICE_ARCHS
tvos: VALID_ARCHS = $$QMAKE_TVOS_DEVICE_ARCHS
+ watchos: VALID_ARCHS = $$QMAKE_WATCHOS_DEVICE_ARCHS
} else {
ios: VALID_ARCHS = $$QMAKE_IOS_SIMULATOR_ARCHS
tvos: VALID_ARCHS = $$QMAKE_TVOS_SIMULATOR_ARCHS
+ watchos: VALID_ARCHS = $$QMAKE_WATCHOS_SIMULATOR_ARCHS
}
single_arch: VALID_ARCHS = $$first(VALID_ARCHS)
diff --git a/mkspecs/features/uikit/default_pre.prf b/mkspecs/features/uikit/default_pre.prf
index 9b2ebc19bd..e719ab0848 100644
--- a/mkspecs/features/uikit/default_pre.prf
+++ b/mkspecs/features/uikit/default_pre.prf
@@ -11,7 +11,7 @@ lessThan(QMAKE_XCODE_VERSION, "4.3"): \
build_pass:simulator {
# For a simulator_and_device build all the config tests
- # are based on the iPhoneOS ARM SDK, but we know that the simulator
+ # are based on the iPhoneOS/WatchOS ARM SDK, but we know that the simulator
# is i386 and that we support SSE/SSE2.
QT_ARCH = i386
QT_CPU_FEATURES.i386 = sse sse2
diff --git a/mkspecs/features/uikit/device_destinations.sh b/mkspecs/features/uikit/device_destinations.sh
index b378d67500..2c117d0ad4 100755
--- a/mkspecs/features/uikit/device_destinations.sh
+++ b/mkspecs/features/uikit/device_destinations.sh
@@ -60,6 +60,10 @@ xcodebuild test -scheme $2 -destination 'id=0' -destination-timeout 1 2>&1| sed
echo "HARDWARE_DEVICES += $id"
elif [ "$val" = "tvOS Simulator" -a "$id" != "$booted_simulator" ]; then
echo "SIMULATOR_DEVICES += $id"
+ elif [ "$val" = "watchOS" ]; then
+ echo "HARDWARE_DEVICES += $id"
+ elif [ "$val" = "watchOS Simulator" -a "$id" != "$booted_simulator" ]; then
+ echo "SIMULATOR_DEVICES += $id"
fi
fi
done
diff --git a/mkspecs/features/uikit/qt.prf b/mkspecs/features/uikit/qt.prf
index af047be466..4475c137dc 100644
--- a/mkspecs/features/uikit/qt.prf
+++ b/mkspecs/features/uikit/qt.prf
@@ -1,6 +1,6 @@
qt_depends = $$resolve_depends(QT, "QT.")
-equals(TEMPLATE, app):contains(qt_depends, gui(-private)?) {
+!watchos:equals(TEMPLATE, app):contains(qt_depends, gui(-private)?) {
LIBS *= -L$$[QT_INSTALL_PLUGINS/get]/platforms
lib_name = qios
diff --git a/mkspecs/features/uikit/qt_config.prf b/mkspecs/features/uikit/qt_config.prf
index 71e0982f7e..5fa5a536f8 100644
--- a/mkspecs/features/uikit/qt_config.prf
+++ b/mkspecs/features/uikit/qt_config.prf
@@ -10,6 +10,7 @@ isEmpty(QT_ARCH) {
} else { # Simulator
ios: QT_ARCH = i386
tvos: QT_ARCH = x64
+ watchos: QT_ARCH = i386
}
# Prevent the arch/config tests from building as multi-arch binaries,
diff --git a/mkspecs/features/uikit/xcodebuild.prf b/mkspecs/features/uikit/xcodebuild.prf
index 6e50bbcf50..82bcd9a315 100644
--- a/mkspecs/features/uikit/xcodebuild.prf
+++ b/mkspecs/features/uikit/xcodebuild.prf
@@ -43,6 +43,10 @@ tvos {
DEVICE_FILTER = "Apple TV"
GENERIC_DEVICE_DESTINATION = "generic/platform=tvOS"
}
+watchos {
+ DEVICE_FILTER = "Apple Watch"
+ GENERIC_DEVICE_DESTINATION = "generic/platform=watchOS"
+}
QMAKE_EXTRA_VARIABLES += DEVICE_SDK SIMULATOR_SDK DEVICE_FILTER GENERIC_DEVICE_DESTINATION
QMAKE_EXTRA_INCLUDES += $$shell_quote($$PWD/xcodebuild.mk)
diff --git a/mkspecs/macx-watchos-clang/Info.plist.app b/mkspecs/macx-watchos-clang/Info.plist.app
new file mode 100644
index 0000000000..cceb9c5b5a
--- /dev/null
+++ b/mkspecs/macx-watchos-clang/Info.plist.app
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Created by Qt/QMake</string>
+ <key>CFBundleSignature</key>
+ <string>@TYPEINFO@</string>
+ <key>CFBundleExecutable</key>
+ <string>@EXECUTABLE@</string>
+ <key>CFBundleIdentifier</key>
+ <string>@BUNDLEIDENTIFIER@</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ </array>
+ <key>WKWatchKitApp</key>
+ <true/>
+ <key>NOTE</key>
+ <string>This file was generated by Qt/QMake.</string>
+</dict>
+</plist>
diff --git a/mkspecs/macx-watchos-clang/Info.plist.lib b/mkspecs/macx-watchos-clang/Info.plist.lib
new file mode 100644
index 0000000000..7cbdb9af12
--- /dev/null
+++ b/mkspecs/macx-watchos-clang/Info.plist.lib
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>@SHORT_VERSION@</string>
+ <key>CFBundleVersion</key>
+ <string>@FULL_VERSION@</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Created by Qt/QMake</string>
+ <key>CFBundleSignature</key>
+ <string>@TYPEINFO@</string>
+ <key>CFBundleExecutable</key>
+ <string>@LIBRARY@</string>
+ <key>CFBundleIdentifier</key>
+ <string>@BUNDLEIDENTIFIER@</string>
+ <key>NOTE</key>
+ <string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
+</dict>
+</plist>
diff --git a/mkspecs/macx-watchos-clang/qmake.conf b/mkspecs/macx-watchos-clang/qmake.conf
new file mode 100644
index 0000000000..bb9ab703b7
--- /dev/null
+++ b/mkspecs/macx-watchos-clang/qmake.conf
@@ -0,0 +1,21 @@
+#
+# qmake configuration for macx-watchos-clang
+#
+
+QMAKE_WATCHOS_DEPLOYMENT_TARGET = 2.2
+
+INCLUDEPATH += $$PWD/watchos
+
+QMAKE_WATCHOS_TARGETED_DEVICE_FAMILY = 4
+
+QMAKE_WATCHOS_DEVICE_ARCHS = armv7k
+QMAKE_WATCHOS_SIMULATOR_ARCHS = i386
+
+include(../common/watchos.conf)
+include(../common/gcc-base-mac.conf)
+include(../common/clang.conf)
+include(../common/clang-mac.conf)
+include(../common/ios/clang.conf)
+include(../common/ios/qmake.conf)
+
+load(qt_config)
diff --git a/mkspecs/macx-watchos-clang/qplatformdefs.h b/mkspecs/macx-watchos-clang/qplatformdefs.h
new file mode 100644
index 0000000000..965eb5e97b
--- /dev/null
+++ b/mkspecs/macx-watchos-clang/qplatformdefs.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../common/mac/qplatformdefs.h"