Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / build / config / ios / ios_sdk.gni
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
3 # found in the LICENSE file.
4
5 declare_args() {
6   # SDK path to use. When empty this will use the default SDK based on the
7   # value of use_ios_simulator.
8   ios_sdk_path = ""
9
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 (the empty string)
12   # means to pick the default based on the generator.
13   use_ios_simulator = ""
14
15   # Version of iOS that we're targeting.
16   ios_deployment_target = "6.0"
17 }
18
19 if (use_ios_simulator == "") {
20   # Pick the default based on the generator. Currently, the Ninja build only
21   # supports the simulator, while we default to device builds on Xcode.
22   use_ios_simulator = !is_gyp_xcode_generator
23 } else {
24   # Simulator flag explicitly passed in.
25   if (!is_gyp_xcode_generator) {
26     # The Ninja build currently only targets the simulator.
27     assert(use_ios_simulator,
28            "You can't do an iOS device build using Ninja yet.")
29   }
30 }
31
32 if (ios_sdk_path == "") {
33   # Compute default target.
34   if (use_ios_simulator) {
35     _ios_sdk_to_query = "iphonesimulator"
36   } else {
37     _ios_sdk_to_query = "iphoneos"
38   }
39   _ios_sdk_result =
40     exec_script("ios_sdk.py", [ _ios_sdk_to_query ], "list lines")
41   ios_sdk_path = _ios_sdk_result[0]
42 }