X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fbuild%2Fconfig%2Fios%2Fios_sdk.gni;h=dce993d5cf42fb1888ddb787f6165a5340c4d990;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=f941f3ce09938d91bbd9a0759aa2e7b0f9ed7f85;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/build/config/ios/ios_sdk.gni b/src/build/config/ios/ios_sdk.gni index f941f3c..dce993d 100644 --- a/src/build/config/ios/ios_sdk.gni +++ b/src/build/config/ios/ios_sdk.gni @@ -2,9 +2,41 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# TODO(brettw) support "iphoneos" in addition to the simulator. May also need -# support for common.gypi's "ios_sdk" variable (seems to be a version number) -# and ios_sdk_path (argument that overrides the one returned below). -ios_sdk_result = - exec_script("ios_sdk.py", [ "iphonesimulator" ], "list lines") -ios_sdk_path = ios_sdk_result[0] +declare_args() { + # SDK path to use. When empty this will use the default SDK based on the + # value of use_ios_simulator. + ios_sdk_path = "" + + # Set to true when targeting a simulator build on iOS. False means that the + # target is for running on the device. The default value (the empty string) + # means to pick the default based on the generator. + use_ios_simulator = "" + + # Version of iOS that we're targeting. + ios_deployment_target = "6.0" +} + +if (use_ios_simulator == "") { + # Pick the default based on the generator. Currently, the Ninja build only + # supports the simulator, while we default to device builds on Xcode. + use_ios_simulator = !is_gyp_xcode_generator +} else { + # Simulator flag explicitly passed in. + if (!is_gyp_xcode_generator) { + # The Ninja build currently only targets the simulator. + assert(use_ios_simulator, + "You can't do an iOS device build using Ninja yet.") + } +} + +if (ios_sdk_path == "") { + # Compute default target. + if (use_ios_simulator) { + _ios_sdk_to_query = "iphonesimulator" + } else { + _ios_sdk_to_query = "iphoneos" + } + _ios_sdk_result = + exec_script("ios_sdk.py", [ _ios_sdk_to_query ], "list lines") + ios_sdk_path = _ios_sdk_result[0] +}