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 declare_args() { | 5 declare_args() { |
6 # SDK path to use. When empty this will use the default SDK based on the | 6 # SDK path to use. When empty this will use the default SDK based on the |
7 # value of use_ios_simulator. | 7 # value of use_ios_simulator. |
8 ios_sdk_path = "" | 8 ios_sdk_path = "" |
9 | 9 |
10 # Set to true when targeting a simulator build on iOS. False means that the | 10 # Set to true when targeting a simulator build on iOS. False means that the |
11 # target is for running on the device. The default value is to use the | 11 # target is for running on the device. The default value is to use the |
12 # Simulator except when targeting GYP's Xcode builds (for compat with the | 12 # Simulator except when targeting GYP's Xcode builds (for compat with the |
13 # existing GYP build). | 13 # existing GYP build). |
14 use_ios_simulator = !is_gyp_xcode_generator | 14 use_ios_simulator = true |
15 | 15 |
16 # Version of iOS that we're targeting. | 16 # Version of iOS that we're targeting. |
17 ios_deployment_target = "6.0" | 17 ios_deployment_target = "6.0" |
18 } | 18 } |
19 | 19 |
20 # Simulator flag explicitly passed in. | |
21 if (!is_gyp_xcode_generator) { | |
22 # The Ninja build currently only targets the simulator. | |
23 assert(use_ios_simulator, | |
24 "You can't do an iOS device build using Ninja yet.") | |
25 } | |
26 | |
27 if (ios_sdk_path == "") { | 20 if (ios_sdk_path == "") { |
28 # Compute default target. | 21 # Compute default target. |
29 if (use_ios_simulator) { | 22 if (use_ios_simulator) { |
30 _ios_sdk_to_query = "iphonesimulator" | 23 _ios_sdk_to_query = "iphonesimulator" |
31 } else { | 24 } else { |
32 _ios_sdk_to_query = "iphoneos" | 25 _ios_sdk_to_query = "iphoneos" |
33 } | 26 } |
34 _ios_sdk_result = | 27 _ios_sdk_result = |
35 exec_script("ios_sdk.py", [ _ios_sdk_to_query ], "list lines") | 28 exec_script("ios_sdk.py", [ _ios_sdk_to_query ], "list lines") |
36 ios_sdk_path = _ios_sdk_result[0] | 29 ios_sdk_path = _ios_sdk_result[0] |
37 } | 30 } |
OLD | NEW |