OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # TODO(brettw) support "iphoneos" in addition to the simulator. May also need | 5 declare_args() { |
6 # support for common.gypi's "ios_sdk" variable (seems to be a version number) | 6 # SDK path to use. When empty this will use the default SDK based on the |
7 # and ios_sdk_path (argument that overrides the one returned below). | 7 # value of use_ios_simulator. |
8 ios_sdk_result = | 8 ios_sdk_path = "" |
9 exec_script("ios_sdk.py", [ "iphonesimulator" ], "list lines") | 9 |
10 ios_sdk_path = ios_sdk_result[0] | 10 # Set to true when targeting a simulator build on iOS. False means that the |
| 11 # target is for running on the device. |
| 12 use_ios_simulator = true |
| 13 |
| 14 ios_deployment_target = "6.0" |
| 15 } |
| 16 |
| 17 if (!is_gyp_xcode_generator) { |
| 18 # The Ninja build currently only targets the simulator. |
| 19 assert(use_ios_simulator, "You can't do an iOS device build using Ninja yet.") |
| 20 } |
| 21 |
| 22 if (ios_sdk_path == "") { |
| 23 # Compute default target. |
| 24 if (use_ios_simulator) { |
| 25 _ios_sdk_to_query = "iphonesimulator" |
| 26 } else { |
| 27 _ios_sdk_to_query = "iphoneos" |
| 28 } |
| 29 _ios_sdk_result = |
| 30 exec_script("ios_sdk.py", [ _ios_sdk_to_query ], "list lines") |
| 31 ios_sdk_path = _ios_sdk_result[0] |
| 32 } |
OLD | NEW |