Chromium Code Reviews| Index: components/cronet/ios/cronet_consumer/BUILD.gn |
| diff --git a/components/cronet/ios/cronet_consumer/BUILD.gn b/components/cronet/ios/cronet_consumer/BUILD.gn |
| index 966057c455dd82796d8516e7b42c88d115dac48c..0617968b6884986aba1c0aa58e5383c9735a2d99 100644 |
| --- a/components/cronet/ios/cronet_consumer/BUILD.gn |
| +++ b/components/cronet/ios/cronet_consumer/BUILD.gn |
| @@ -4,27 +4,48 @@ |
| import("//build/config/ios/rules.gni") |
| -ios_app_bundle("cronet_consumer") { |
| - info_plist = "cronet-consumer-Info.plist" |
| +template("cronet_consumer_template") { |
| + _target_name = target_name |
| - deps = [ |
| - "//base:base", |
| - "//components/cronet/ios:cronet_framework+link", |
| + ios_app_bundle(_target_name) { |
| + info_plist = "cronet-consumer-Info.plist" |
| - # All shared libraries must have the sanitizer deps to properly link in |
| - # asan mode (this target will be empty in other cases). |
| - "//build/config:exe_and_shlib_deps", |
| - ] |
| + deps = [ |
| + "//base:base", |
| - sources = [ |
| - "cronet_consumer_app_delegate.h", |
| - "cronet_consumer_app_delegate.mm", |
| - "cronet_consumer_view_controller.h", |
| - "cronet_consumer_view_controller.m", |
| - "main.mm", |
| - ] |
| + # All shared libraries must have the sanitizer deps to properly link in |
| + # asan mode (this target will be empty in other cases). |
| + "//build/config/sanitizers:deps", |
| + ] |
| + |
| + deps += invoker.deps |
| + |
| + if (defined(invoker.bundle_deps)) { |
| + bundle_deps = invoker.bundle_deps |
| + } |
| + |
| + sources = [ |
| + "cronet_consumer_app_delegate.h", |
| + "cronet_consumer_app_delegate.mm", |
| + "cronet_consumer_view_controller.h", |
| + "cronet_consumer_view_controller.m", |
| + "main.mm", |
| + ] |
| + |
| + configs += [ "//build/config/compiler:enable_arc" ] |
| + } |
| +} |
| +cronet_consumer_template("cronet_consumer") { |
| + deps = [ |
| + "//components/cronet/ios:cronet_framework+link", |
| + ] |
| bundle_deps = [ "//components/cronet/ios:cronet_framework+bundle" ] |
| +} |
| - configs += [ "//build/config/compiler:enable_arc" ] |
| +cronet_consumer_template("cronet_consumer_static") { |
| + deps = [ |
| + "//components/cronet/ios:cronet_framework+link", |
|
kapishnikov
2017/05/23 21:37:46
Why do we need "cronet_framework+link" here?
|
| + "//components/cronet/ios:cronet_static_framework", |
| + ] |
| } |