Index: ios/crnet/BUILD.gn |
diff --git a/ios/crnet/BUILD.gn b/ios/crnet/BUILD.gn |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e2145c6a91c9abe03c28b64902ee565fb380cad0 |
--- /dev/null |
+++ b/ios/crnet/BUILD.gn |
@@ -0,0 +1,110 @@ |
+# Copyright 2015 The Chromium Authors. All rights reserved. |
sdefresne
2016/08/02 21:54:11
2015 → 2016
mef
2016/08/02 22:19:17
Done.
|
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+import("//build/buildflag_header.gni") |
+import("//build/config/ios/rules.gni") |
+import("//build/config/mac/symbols.gni") |
+import("//build/mac/tweak_info_plist.gni") |
+import("//build/util/version.gni") |
+import("//chrome/version.gni") |
+import("//testing/test.gni") |
+import("//url/features.gni") |
+ |
+assert(!is_component_build, "CrNet requires static library build.") |
+ |
+source_set("crnet_sources") { |
+ deps = [ |
+ "//base:base", |
+ "//components/metrics:metrics", |
+ "//components/metrics/proto:proto", |
+ "//components/prefs:prefs", |
+ "//ios/net", |
+ "//ios/web:user_agent", |
+ "//net", |
+ "//url", |
+ ] |
+ |
+ sources = [ |
+ "CrNet.h", |
+ "CrNet.mm", |
+ "crnet_environment.h", |
+ "crnet_environment.mm", |
+ "sdch_owner_pref_storage.cc", |
+ "sdch_owner_pref_storage.h", |
+ ] |
+ |
+ if (!use_platform_icu_alternatives) { |
+ deps += [ "//base:i18n" ] |
+ } |
+} |
+ |
+# Tweak |info_plist| with current version and revision. |
+tweak_info_plist("tweak_crnet_plist") { |
+ info_plist = "Info.plist" |
+ args = [] |
+} |
+ |
+ios_framework_bundle("crnet_framework") { |
+ output_name = "CrNet" |
+ info_plist_target = ":tweak_crnet_plist" |
+ code_signing_enabled = false |
+ |
+ deps = [ |
+ ":crnet_sources", |
+ "//base", |
+ "//net:net", |
+ ] |
+ |
+ libs = [ "UIKit.Framework" ] |
+ |
+ public_headers = [ "CrNet.h" ] |
+ |
+ sources = [ |
+ "CrNet.h", |
+ ] |
+ |
+ configs -= [ "//build/config/compiler:default_symbols" ] |
+ configs += [ "//build/config/compiler:symbols" ] |
+} |
+ |
+ios_app_bundle("crnet_consumer") { |
sdefresne
2016/08/02 21:54:11
Move this target to src/ios/crnet/crnet_consumer/B
mef
2016/08/03 20:42:41
Done.
|
+ info_plist = "crnet_consumer/crnet-consumer-info.plist" |
+ |
+ deps = [ |
+ ":crnet_sources", |
sdefresne
2016/08/02 21:54:11
I think this dependency should be removed and inst
mef
2016/08/02 22:19:17
Done. The crnet_consumer app now has embedded fram
|
+ |
+ # 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", |
+ ] |
+ |
+ sources = [ |
+ "crnet_consumer/crnet_consumer_app_delegate.h", |
+ "crnet_consumer/crnet_consumer_app_delegate.mm", |
+ "crnet_consumer/crnet_consumer_view_controller.h", |
+ "crnet_consumer/crnet_consumer_view_controller.m", |
+ "crnet_consumer/main.mm", |
+ ] |
+ |
+ configs += [ "//build/config/compiler:enable_arc" ] |
+} |
+ |
+test("crnet_test") { |
sdefresne
2016/08/02 21:54:11
Move this target to src/ios/crnet/test/BUILD.gn.
mef
2016/08/03 20:42:41
Done.
|
+ testonly = true |
+ sources = [ |
+ "test/crnet_http_tests.mm", |
+ "test/crnet_test_runner.mm", |
+ ] |
+ |
+ deps = [ |
+ ":crnet_sources", |
sdefresne
2016/08/02 21:54:11
ditto about dependency on ":crnet_sources"
mef
2016/08/03 20:42:41
Hrm, this target uses stuff that is not exported f
|
+ "//base", |
+ "//base:i18n", |
+ "//ios/third_party/gcdwebserver", |
+ "//net", |
+ "//net:simple_quic_tools", |
+ "//net:test_support", |
+ "//third_party/icu", |
+ ] |
+} |