| 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/buildflag_header.gni") | 5 import("//build/buildflag_header.gni") |
| 6 import("//build/config/ios/rules.gni") | 6 import("//build/config/ios/rules.gni") |
| 7 import("//build/config/mac/symbols.gni") | 7 import("//build/config/mac/symbols.gni") |
| 8 import("//build/mac/tweak_info_plist.gni") | 8 import("//build/mac/tweak_info_plist.gni") |
| 9 import("//build/util/process_version.gni") | 9 import("//build/util/process_version.gni") |
| 10 import("//build/util/version.gni") | 10 import("//build/util/version.gni") |
| 11 import("//components/grpc_support/include/headers.gni") |
| 11 import("//testing/test.gni") | 12 import("//testing/test.gni") |
| 12 import("//url/features.gni") | 13 import("//url/features.gni") |
| 13 | 14 |
| 14 assert(!is_component_build, "Cronet requires static library build.") | 15 assert(!is_component_build, "Cronet requires static library build.") |
| 15 | 16 |
| 16 declare_args() { | 17 declare_args() { |
| 17 cronet_enable_data_reduction_proxy_support = false | 18 cronet_enable_data_reduction_proxy_support = false |
| 18 } | 19 } |
| 19 | 20 |
| 20 process_version("cronet_version_header") { | 21 process_version("cronet_version_header") { |
| 21 template_file = "//components/cronet/version.h.in" | 22 template_file = "//components/cronet/version.h.in" |
| 22 sources = [ | 23 sources = [ |
| 23 "//chrome/VERSION", | 24 "//chrome/VERSION", |
| 24 ] | 25 ] |
| 25 output = "$target_gen_dir/version.h" | 26 output = "$target_gen_dir/version.h" |
| 26 extra_args = [ | 27 extra_args = [ |
| 27 "-e", | 28 "-e", |
| 28 "VERSION_FULL=\"%s.%s.%s.%s\" % (MAJOR,MINOR,BUILD,PATCH)", | 29 "VERSION_FULL=\"%s.%s.%s.%s\" % (MAJOR,MINOR,BUILD,PATCH)", |
| 29 ] | 30 ] |
| 30 } | 31 } |
| 31 | 32 |
| 32 source_set("cronet_sources") { | 33 source_set("cronet_sources") { |
| 33 deps = [ | 34 deps = [ |
| 34 ":cronet_version_header", | 35 ":cronet_version_header", |
| 35 "//base:base", | 36 "//base:base", |
| 37 "//components/grpc_support", |
| 36 "//components/metrics:metrics", | 38 "//components/metrics:metrics", |
| 37 "//components/metrics/proto:proto", | 39 "//components/metrics/proto:proto", |
| 38 "//components/prefs:prefs", | 40 "//components/prefs:prefs", |
| 39 "//ios/net:net", | 41 "//ios/net:net", |
| 40 "//ios/web:user_agent", | 42 "//ios/web:user_agent", |
| 41 "//net", | 43 "//net", |
| 42 "//url", | 44 "//url", |
| 43 ] | 45 ] |
| 44 | 46 |
| 45 sources = [ | 47 sources = [ |
| 46 "../histogram_manager.cc", | 48 "../histogram_manager.cc", |
| 47 "../histogram_manager.h", | 49 "../histogram_manager.h", |
| 48 "../stale_host_resolver.cc", | 50 "../stale_host_resolver.cc", |
| 49 "../stale_host_resolver.h", | 51 "../stale_host_resolver.h", |
| 50 "../url_request_context_config.cc", | 52 "../url_request_context_config.cc", |
| 51 "../url_request_context_config.h", | 53 "../url_request_context_config.h", |
| 52 "Cronet.h", | 54 "Cronet.h", |
| 53 "Cronet.mm", | 55 "Cronet.mm", |
| 54 "cronet_bidirectional_stream.cc", | |
| 55 "cronet_bidirectional_stream.h", | |
| 56 "cronet_c_for_grpc.cc", | |
| 57 "cronet_c_for_grpc.h", | |
| 58 "cronet_environment.cc", | 56 "cronet_environment.cc", |
| 59 "cronet_environment.h", | 57 "cronet_environment.h", |
| 60 ] | 58 ] |
| 61 | 59 |
| 60 include_dirs = [ "//components/grpc_support/include" ] |
| 61 |
| 62 if (!use_platform_icu_alternatives) { | 62 if (!use_platform_icu_alternatives) { |
| 63 deps += [ "//base:i18n" ] | 63 deps += [ "//base:i18n" ] |
| 64 } | 64 } |
| 65 } | 65 } |
| 66 | 66 |
| 67 # Tweak |info_plist| with current version and revision. | 67 # Tweak |info_plist| with current version and revision. |
| 68 tweak_info_plist("tweak_cronet_plist") { | 68 tweak_info_plist("tweak_cronet_plist") { |
| 69 info_plist = "Info.plist" | 69 info_plist = "Info.plist" |
| 70 args = [ "--platform=ios" ] | 70 args = [ "--platform=ios" ] |
| 71 } | 71 } |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 141 |
| 142 deps = [ | 142 deps = [ |
| 143 ":cronet_framework_resources", | 143 ":cronet_framework_resources", |
| 144 ":cronet_sources", | 144 ":cronet_sources", |
| 145 "//base", | 145 "//base", |
| 146 "//net:net", | 146 "//net:net", |
| 147 ] | 147 ] |
| 148 | 148 |
| 149 libs = [ "UIKit.Framework" ] | 149 libs = [ "UIKit.Framework" ] |
| 150 | 150 |
| 151 public_headers = [ | 151 include_dirs = [ "//components/grpc_support/include" ] |
| 152 "Cronet.h", | 152 |
| 153 "cronet_c_for_grpc.h", | 153 public_deps = [ |
| 154 "//components/grpc_support", |
| 154 ] | 155 ] |
| 155 | 156 |
| 157 public_headers = [ "Cronet.h" ] |
| 158 public_headers += grpc_public_headers |
| 159 |
| 156 sources = [ | 160 sources = [ |
| 157 "Cronet.h", | 161 "Cronet.h", |
| 158 "cronet_c_for_grpc.h", | |
| 159 ] | 162 ] |
| 160 | 163 |
| 161 configs -= [ "//build/config/compiler:default_symbols" ] | 164 configs -= [ "//build/config/compiler:default_symbols" ] |
| 162 configs += [ "//build/config/compiler:symbols" ] | 165 configs += [ "//build/config/compiler:symbols" ] |
| 163 } | 166 } |
| 164 | 167 |
| 165 test("cronet_unittests") { | 168 test("cronet_unittests") { |
| 166 testonly = true | 169 testonly = true |
| 167 | 170 |
| 168 sources = [ | 171 sources = [ |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 ] | 224 ] |
| 222 } | 225 } |
| 223 | 226 |
| 224 group("cronet_package") { | 227 group("cronet_package") { |
| 225 deps = [ | 228 deps = [ |
| 226 ":cronet_package_copy", | 229 ":cronet_package_copy", |
| 227 ":generate_license", | 230 ":generate_license", |
| 228 ] | 231 ] |
| 229 } | 232 } |
| 230 } | 233 } |
| OLD | NEW |