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/base_rules.gni") | 6 import("//build/config/mac/base_rules.gni") |
7 import("//build/config/mac/symbols.gni") | 7 import("//build/config/mac/symbols.gni") |
8 | 8 |
9 # Generates Info.plist files for Mac apps and frameworks. | 9 # Generates Info.plist files for Mac apps and frameworks. |
10 # | 10 # |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 _is_fat_build_main_target = current_toolchain == default_toolchain | 151 _is_fat_build_main_target = current_toolchain == default_toolchain |
152 } | 152 } |
153 | 153 |
154 if (_is_fat_build && !_is_fat_build_main_target) { | 154 if (_is_fat_build && !_is_fat_build_main_target) { |
155 # For the non-default toolchain of a fat-build, the template expands to a | 155 # For the non-default toolchain of a fat-build, the template expands to a |
156 # single "executable" target that creates "$root_out_dir/$_output_name". | 156 # single "executable" target that creates "$root_out_dir/$_output_name". |
157 executable(_target_name) { | 157 executable(_target_name) { |
158 forward_variables_from(invoker, | 158 forward_variables_from(invoker, |
159 "*", | 159 "*", |
160 [ | 160 [ |
| 161 "bundle_deps", |
161 "bundle_extension", | 162 "bundle_extension", |
162 "entitlements_path", | 163 "entitlements_path", |
163 "extra_substitutions", | 164 "extra_substitutions", |
164 "info_plist", | 165 "info_plist", |
165 "info_plist_target", | 166 "info_plist_target", |
166 "output_name", | 167 "output_name", |
167 "product_type", | 168 "product_type", |
168 ]) | 169 ]) |
169 | 170 |
170 if (defined(visibility)) { | 171 if (defined(visibility)) { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 _link_executable_visibility = [ ":$_lipo_executable" ] | 234 _link_executable_visibility = [ ":$_lipo_executable" ] |
234 _link_executable = _target_name + "_arch_executable" | 235 _link_executable = _target_name + "_arch_executable" |
235 | 236 |
236 _arch_executable_path = "$target_out_dir/$current_cpu/$_output_name" | 237 _arch_executable_path = "$target_out_dir/$current_cpu/$_output_name" |
237 } | 238 } |
238 | 239 |
239 executable(_link_executable) { | 240 executable(_link_executable) { |
240 forward_variables_from(invoker, | 241 forward_variables_from(invoker, |
241 "*", | 242 "*", |
242 [ | 243 [ |
| 244 "bundle_deps", |
243 "bundle_extension", | 245 "bundle_extension", |
244 "data_deps", | 246 "data_deps", |
245 "entitlements_path", | 247 "entitlements_path", |
246 "extra_substitutions", | 248 "extra_substitutions", |
247 "info_plist", | 249 "info_plist", |
248 "info_plist_target", | 250 "info_plist_target", |
249 "output_name", | 251 "output_name", |
250 "product_type", | 252 "product_type", |
251 "visibility", | 253 "visibility", |
252 ]) | 254 ]) |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 deps += [ ":$_bundle_data_info_plist" ] | 382 deps += [ ":$_bundle_data_info_plist" ] |
381 if (ios_enable_code_signing) { | 383 if (ios_enable_code_signing) { |
382 if (_is_fat_build) { | 384 if (_is_fat_build) { |
383 deps += [ ":$_lipo_executable" ] | 385 deps += [ ":$_lipo_executable" ] |
384 } else { | 386 } else { |
385 deps += [ ":$_link_executable" ] | 387 deps += [ ":$_link_executable" ] |
386 } | 388 } |
387 } else { | 389 } else { |
388 deps += [ ":$_bundle_data_executable" ] | 390 deps += [ ":$_bundle_data_executable" ] |
389 } | 391 } |
| 392 if (defined(invoker.bundle_deps)) { |
| 393 deps += invoker.bundle_deps |
| 394 } |
390 | 395 |
391 if (use_ios_simulator) { | 396 if (use_ios_simulator) { |
392 if (!defined(data_deps)) { | 397 if (!defined(data_deps)) { |
393 data_deps = [] | 398 data_deps = [] |
394 } | 399 } |
395 data_deps += [ "//testing/iossim" ] | 400 data_deps += [ "//testing/iossim" ] |
396 } | 401 } |
397 | 402 |
398 if (defined(invoker.product_type)) { | 403 if (defined(invoker.product_type)) { |
399 product_type = invoker.product_type | 404 product_type = invoker.product_type |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 if (defined(invoker.info_plist)) { | 468 if (defined(invoker.info_plist)) { |
464 assert(invoker.info_plist != "", "mark invoker.info_plist as used") | 469 assert(invoker.info_plist != "", "mark invoker.info_plist as used") |
465 } | 470 } |
466 if (defined(invoker.info_plist_target)) { | 471 if (defined(invoker.info_plist_target)) { |
467 assert(invoker.info_plist_target != "", | 472 assert(invoker.info_plist_target != "", |
468 "mark invoker.info_plist_target as used") | 473 "mark invoker.info_plist_target as used") |
469 } | 474 } |
470 if (defined(invoker.product_type)) { | 475 if (defined(invoker.product_type)) { |
471 assert(invoker.product_type != "", "mark product_type as used") | 476 assert(invoker.product_type != "", "mark product_type as used") |
472 } | 477 } |
| 478 if (defined(invoker.bundle_deps)) { |
| 479 assert(invoker.bundle_deps != [], "mark bundle_deps as used") |
| 480 } |
473 } | 481 } |
474 | 482 |
475 set_defaults("ios_app_bundle") { | 483 set_defaults("ios_app_bundle") { |
476 configs = default_executable_configs | 484 configs = default_executable_configs |
477 } | 485 } |
478 | 486 |
479 # Template to build an application extension bundle for iOS. | 487 # Template to build an application extension bundle for iOS. |
480 # | 488 # |
481 # This should be used instead of "executable" built-in target type on iOS. | 489 # This should be used instead of "executable" built-in target type on iOS. |
482 # As the template forward the generation of the application executable to | 490 # As the template forward the generation of the application executable to |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 public_deps = [ | 857 public_deps = [ |
850 ":$_framework_target+link$_toolchain_suffix", | 858 ":$_framework_target+link$_toolchain_suffix", |
851 ] | 859 ] |
852 } | 860 } |
853 } | 861 } |
854 } | 862 } |
855 | 863 |
856 set_defaults("ios_framework_bundle") { | 864 set_defaults("ios_framework_bundle") { |
857 configs = default_shared_library_configs | 865 configs = default_shared_library_configs |
858 } | 866 } |
OLD | NEW |