diff options
author | Jake Petroules <jake.petroules@theqtcompany.com> | 2015-09-09 19:12:13 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@theqtcompany.com> | 2015-09-11 10:31:37 +0000 |
commit | 26f5a886ed4aa3c9b7a0a9c2d15494054033bb99 (patch) | |
tree | 1bac4d4c603e2a0568d3f12e84cbdbf4ecfeef9c /share/qbs | |
parent | 216ad20c09f160722598a6780e4271f0010bc616 (diff) |
Fix "else assumptions" and other conditionals relating to Apple OSes.
Change-Id: I0d495d629919a19169a081abaa5a793b9dd251c6
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'share/qbs')
-rw-r--r-- | share/qbs/modules/bundle/BundleModule.qbs | 5 | ||||
-rw-r--r-- | share/qbs/modules/cpp/DarwinGCC.qbs | 32 |
2 files changed, 24 insertions, 13 deletions
diff --git a/share/qbs/modules/bundle/BundleModule.qbs b/share/qbs/modules/bundle/BundleModule.qbs index 0e3d9bb13..833aeb68b 100644 --- a/share/qbs/modules/bundle/BundleModule.qbs +++ b/share/qbs/modules/bundle/BundleModule.qbs @@ -45,7 +45,7 @@ Module { || product.type.contains("dynamiclibrary") || product.type.contains("loadablemodule")) && !product.consoleApplication - property bool isShallow: qbs.targetOS.contains("ios") && product.type.contains("application") + property bool isShallow: !qbs.targetOS.contains("osx") && product.type.contains("application") property string identifierPrefix: "org.example" property string identifier: [identifierPrefix, qbs.rfc1034Identifier(product.targetName)].join(".") @@ -102,8 +102,7 @@ Module { property string infoPlistFormat: { if (qbs.targetOS.contains("osx")) return infoPlistFile ? "same-as-input" : "xml1"; - else if (qbs.targetOS.contains("ios")) - return "binary1"; + return "binary1"; } property string localizedResourcesFolderSuffix: ".lproj" diff --git a/share/qbs/modules/cpp/DarwinGCC.qbs b/share/qbs/modules/cpp/DarwinGCC.qbs index 78c2bb562..6f066ab2d 100644 --- a/share/qbs/modules/cpp/DarwinGCC.qbs +++ b/share/qbs/modules/cpp/DarwinGCC.qbs @@ -71,26 +71,38 @@ UnixGCC { dict["LSMinimumSystemVersion"] = minimumOsxVersion; } - if (qbs.targetOS.contains("ios")) { + if (qbs.targetOS.contains("ios") || qbs.targetOS.contains("tvos")) { dict["LSRequiresIPhoneOS"] = true; - // architectures supported, to support iPhone 3G for example one has to add - // armv6 to the list and also compile for it (with Xcode 4.4.1 or earlier) - if (!qbs.targetOS.contains("ios-simulator")) - dict["UIRequiredDeviceCapabilities"] = [ "armv7" ]; + if (qbs.targetOS.contains("ios") && !qbs.targetOS.contains("ios-simulator")) + dict["UIRequiredDeviceCapabilities"] = ["armv7"]; + if (qbs.targetOS.contains("tvos") && !qbs.targetOS.contains("tvos-simulator")) + dict["UIRequiredDeviceCapabilities"] = ["arm64"]; + } + + var targetDevices = DarwinTools.targetedDeviceFamily(xcode.targetDevices); + if (qbs.targetOS.contains("ios") && xcode.present) + dict["UIDeviceFamily"] = targetDevices; + + if (qbs.targetOS.contains("ios") || qbs.targetOS.contains("watchos")) { var orientations = [ "UIInterfaceOrientationPortrait", + "UIInterfaceOrientationPortraitUpsideDown", "UIInterfaceOrientationLandscapeLeft", "UIInterfaceOrientationLandscapeRight" ]; - dict["UISupportedInterfaceOrientations"] = orientations; - orientations.splice(1, 0, "UIInterfaceOrientationPortraitUpsideDown"); - dict["UISupportedInterfaceOrientations~ipad"] = orientations; + if (targetDevices.contains("ipad")) + dict["UISupportedInterfaceOrientations~ipad"] = orientations; + + if (targetDevices.contains("watch")) + dict["UISupportedInterfaceOrientations"] = orientations.slice(0, 2); - if (xcode.present) - dict["UIDeviceFamily"] = DarwinTools.targetedDeviceFamily(xcode.targetDevices) + if (targetDevices.contains("iphone")) { + orientations.splice(1, 1); + dict["UISupportedInterfaceOrientations"] = orientations; + } } return dict; |