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..c0cfd1d53f3aa75195a5b78b699a2337e04e02a6 100644 |
--- a/components/cronet/ios/cronet_consumer/BUILD.gn |
+++ b/components/cronet/ios/cronet_consumer/BUILD.gn |
@@ -4,27 +4,47 @@ |
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_hide", |
+ ] |
} |