diff options
author | Jake Petroules <jake.petroules@theqtcompany.com> | 2015-09-08 22:46:10 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@theqtcompany.com> | 2015-09-11 10:31:29 +0000 |
commit | 216ad20c09f160722598a6780e4271f0010bc616 (patch) | |
tree | c0d45fb354728e95c97eda4f53402b0be85c900d /share/qbs | |
parent | f75708f39dc6f3fc856615dea49b184af035465a (diff) |
Add skeleton tvOS support.
Change-Id: I234cec127b1644f1ef53fe5c287da7158152ac12
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'share/qbs')
-rw-r--r-- | share/qbs/imports/qbs/DarwinTools/darwin-tools.js | 7 | ||||
-rw-r--r-- | share/qbs/modules/cpp/CppModule.qbs | 8 | ||||
-rw-r--r-- | share/qbs/modules/cpp/DarwinGCC.qbs | 2 | ||||
-rw-r--r-- | share/qbs/modules/cpp/tvos-gcc.qbs | 47 | ||||
-rw-r--r-- | share/qbs/modules/xcode/xcode.js | 4 |
5 files changed, 67 insertions, 1 deletions
diff --git a/share/qbs/imports/qbs/DarwinTools/darwin-tools.js b/share/qbs/imports/qbs/DarwinTools/darwin-tools.js index bad0c1a0e..fb05a6f9c 100644 --- a/share/qbs/imports/qbs/DarwinTools/darwin-tools.js +++ b/share/qbs/imports/qbs/DarwinTools/darwin-tools.js @@ -58,6 +58,8 @@ function targetDevices(targetOS) { return ["mac"]; if (targetOS.contains("ios")) return ["iphone", "ipad"]; + if (targetOS.contains("tvos")) + return ["tv"]; if (targetOS.contains("watchos")) return ["watch"]; } @@ -73,7 +75,6 @@ function targetedDeviceFamily(deviceNames) { /** * Returns the most appropriate Apple platform name given a targetOS list. - * Possible platform names include macosx, iphoneos, and iphonesimulator. */ function applePlatformName(targetOSList) { if (targetOSList.contains("ios-simulator")) @@ -82,6 +83,10 @@ function applePlatformName(targetOSList) { return "iphoneos"; else if (targetOSList.contains("osx")) return "macosx"; + else if (targetOSList.contains("tvos-simulator")) + return "appletvsimulator"; + else if (targetOSList.contains("tvos")) + return "appletvos"; else if (targetOSList.contains("watchos-simulator")) return "watchsimulator"; else if (targetOSList.contains("watchos")) diff --git a/share/qbs/modules/cpp/CppModule.qbs b/share/qbs/modules/cpp/CppModule.qbs index 004abcc0e..e671b1cae 100644 --- a/share/qbs/modules/cpp/CppModule.qbs +++ b/share/qbs/modules/cpp/CppModule.qbs @@ -97,6 +97,14 @@ Module { defaults will be used." } + property string minimumTvosVersion + PropertyOptions { + name: "minimumTvosVersion" + description: "a version number in the format [major].[minor] indicating the earliest \ + version of tvOS that the product should run on. if undefined, compiler \ + defaults will be used." + } + property string minimumAndroidVersion PropertyOptions { name: "minimumAndroidVersion" diff --git a/share/qbs/modules/cpp/DarwinGCC.qbs b/share/qbs/modules/cpp/DarwinGCC.qbs index 6804ba089..78c2bb562 100644 --- a/share/qbs/modules/cpp/DarwinGCC.qbs +++ b/share/qbs/modules/cpp/DarwinGCC.qbs @@ -112,6 +112,8 @@ UnixGCC { env["MACOSX_DEPLOYMENT_TARGET"] = minimumOsxVersion || ""; if (qbs.targetOS.contains("watchos")) env["WATCHOS_DEPLOYMENT_TARGET"] = minimumWatchosVersion || ""; + if (qbs.targetOS.contains("tvos")) + env["TVOS_DEPLOYMENT_TARGET"] = minimumTvosVersion || ""; if (xcode.present) env["TARGETED_DEVICE_FAMILY"] = DarwinTools.targetedDeviceFamily(xcode.targetDevices); diff --git a/share/qbs/modules/cpp/tvos-gcc.qbs b/share/qbs/modules/cpp/tvos-gcc.qbs new file mode 100644 index 000000000..54922f8ef --- /dev/null +++ b/share/qbs/modules/cpp/tvos-gcc.qbs @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing +** +** This file is part of the Qt Build Suite. +** +** 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. +** +** In addition, 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. +** +****************************************************************************/ + +import qbs + +DarwinGCC { + condition: qbs.hostOS.contains('osx') && + qbs.targetOS.contains('tvos') && + qbs.toolchain && qbs.toolchain.contains('gcc') + + targetSystem: "tvos" + (minimumTvosVersion || "") + + minimumDarwinVersion: minimumTvosVersion + minimumDarwinVersionCompilerFlag: qbs.targetOS.contains("tvos-simulator") + ? "-mtvos-simulator-version-min" + : "-mtvos-version-min" + minimumDarwinVersionLinkerFlag: qbs.targetOS.contains("tvos-simulator") + ? "-tvos_simulator_version_min" + : "-tvos_version_min" +} diff --git a/share/qbs/modules/xcode/xcode.js b/share/qbs/modules/xcode/xcode.js index 7c259d3bc..bc0e973a8 100644 --- a/share/qbs/modules/xcode/xcode.js +++ b/share/qbs/modules/xcode/xcode.js @@ -42,6 +42,10 @@ function applePlatformDirectoryName(targetOSList, version, throwOnError) { return "iPhoneOS" + version; else if (targetOSList.contains("osx")) return "MacOSX" + version; + else if (targetOSList.contains("tvos-simulator")) + return "AppleTVSimulator" + version; + else if (targetOSList.contains("tvos")) + return "AppleTVOS" + version; else if (targetOSList.contains("watchos-simulator")) return "WatchSimulator" + version; else if (targetOSList.contains("watchos")) |