| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 import("//build/config/ios/ios_sdk.gni") | 5 import("//build/config/ios/ios_sdk.gni") |
| 6 import("//build/config/mac/rules.gni") | 6 import("//build/config/mac/rules.gni") |
| 7 | 7 |
| 8 # TODO(crbug.com/297668): refactor this template to extract common behaviour | 8 # TODO(crbug.com/297668): refactor this template to extract common behaviour |
| 9 # between OS X and iOS bundle generation, then create a generic "app" template | 9 # between OS X and iOS bundle generation, then create a generic "app" template |
| 10 # that forward to "executable" on all platform except iOS/OS X. | 10 # that forward to "executable" on all platform except iOS/OS X. |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 _nib_basename = get_path_info(invoker.source, "name") | 191 _nib_basename = get_path_info(invoker.source, "name") |
| 192 _nib_filename = "$_nib_basename.nib" | 192 _nib_filename = "$_nib_basename.nib" |
| 193 | 193 |
| 194 action(_compile_xib) { | 194 action(_compile_xib) { |
| 195 visibility = [ ":$_target_name" ] | 195 visibility = [ ":$_target_name" ] |
| 196 script = "//build/config/ios/ios_compile_xib.py" | 196 script = "//build/config/ios/ios_compile_xib.py" |
| 197 sources = [ | 197 sources = [ |
| 198 invoker.source, | 198 invoker.source, |
| 199 ] | 199 ] |
| 200 outputs = [ | 200 outputs = [ |
| 201 "$target_gen_dir/$_nib_filename/objects.nib", | 201 "$target_gen_dir/$_nib_filename", |
| 202 "$target_gen_dir/$_nib_filename/runtime.nib", | |
| 203 ] | 202 ] |
| 204 args = [ | 203 args = [ |
| 205 "--minimum-deployment-target", | 204 "--minimum-deployment-target", |
| 206 ios_deployment_target, | 205 ios_deployment_target, |
| 207 "--output", | 206 "--output", |
| 208 rebase_path("$target_gen_dir/$_nib_filename"), | 207 rebase_path("$target_gen_dir/$_nib_filename"), |
| 209 "--input", | 208 "--input", |
| 210 rebase_path(invoker.source, root_out_dir), | 209 rebase_path(invoker.source, root_out_dir), |
| 211 ] | 210 ] |
| 212 } | 211 } |
| 213 | 212 |
| 214 bundle_data(_target_name) { | 213 bundle_data(_target_name) { |
| 215 forward_variables_from(invoker, "*", [ "source" ]) | 214 forward_variables_from(invoker, "*", [ "source" ]) |
| 216 | 215 |
| 217 if (!defined(public_deps)) { | 216 if (!defined(public_deps)) { |
| 218 public_deps = [] | 217 public_deps = [] |
| 219 } | 218 } |
| 220 public_deps += [ ":$_compile_xib" ] | 219 public_deps += [ ":$_compile_xib" ] |
| 221 | 220 |
| 222 sources = [ | 221 sources = [ |
| 223 "$target_gen_dir/$_nib_filename/objects.nib", | 222 "$target_gen_dir/$_nib_filename", |
| 224 "$target_gen_dir/$_nib_filename/runtime.nib", | |
| 225 ] | 223 ] |
| 226 outputs = [ | 224 outputs = [ |
| 227 "{{bundle_resources_dir}}/$_nib_filename/{{source_file_part}}", | 225 "{{bundle_resources_dir}}/$_nib_filename", |
| 228 ] | 226 ] |
| 229 } | 227 } |
| 230 } | 228 } |
| 231 | 229 |
| 232 # Template to package a shared library into an iOS framework bundle. | 230 # Template to package a shared library into an iOS framework bundle. |
| 233 # | 231 # |
| 234 # Arguments | 232 # Arguments |
| 235 # | 233 # |
| 236 # output_name: | 234 # output_name: |
| 237 # (optional) string, name of the generated framework without the | 235 # (optional) string, name of the generated framework without the |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 | 341 |
| 344 if (defined(_public_headers)) { | 342 if (defined(_public_headers)) { |
| 345 configs += [ ":$_headers_map_config" ] | 343 configs += [ ":$_headers_map_config" ] |
| 346 if (!defined(deps)) { | 344 if (!defined(deps)) { |
| 347 deps = [] | 345 deps = [] |
| 348 } | 346 } |
| 349 deps += [ ":$_framework_headers_target" ] | 347 deps += [ ":$_framework_headers_target" ] |
| 350 } | 348 } |
| 351 } | 349 } |
| 352 } | 350 } |
| OLD | NEW |