OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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/ios/rules.gni") | 6 import("//build/config/ios/rules.gni") |
7 import("//components/grpc_support/include/headers.gni") | 7 import("//components/grpc_support/include/headers.gni") |
8 import("//tools/grit/repack.gni") | 8 import("//tools/grit/repack.gni") |
9 | 9 |
10 config("config") { | 10 config("config") { |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 "internal/web_view_web_main_delegate.h", | 88 "internal/web_view_web_main_delegate.h", |
89 "internal/web_view_web_main_delegate.mm", | 89 "internal/web_view_web_main_delegate.mm", |
90 "internal/web_view_web_main_parts.h", | 90 "internal/web_view_web_main_parts.h", |
91 "internal/web_view_web_main_parts.mm", | 91 "internal/web_view_web_main_parts.mm", |
92 "internal/web_view_web_state_policy_decider.h", | 92 "internal/web_view_web_state_policy_decider.h", |
93 "internal/web_view_web_state_policy_decider.mm", | 93 "internal/web_view_web_state_policy_decider.mm", |
94 ] | 94 ] |
95 ios_web_view_sources += ios_web_view_public_headers | 95 ios_web_view_sources += ios_web_view_public_headers |
96 | 96 |
97 ios_web_view_deps = [ | 97 ios_web_view_deps = [ |
98 ":generate_license", | |
99 ":packed_resources", | 98 ":packed_resources", |
100 "//base", | 99 "//base", |
101 "//components/flags_ui", | 100 "//components/flags_ui", |
102 "//components/infobars/core", | 101 "//components/infobars/core", |
103 "//components/keyed_service/core", | 102 "//components/keyed_service/core", |
104 "//components/keyed_service/ios", | 103 "//components/keyed_service/ios", |
105 "//components/net_log", | 104 "//components/net_log", |
106 "//components/pref_registry", | 105 "//components/pref_registry", |
107 "//components/prefs", | 106 "//components/prefs", |
108 "//components/proxy_config", | 107 "//components/proxy_config", |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 ":repack_resources", | 217 ":repack_resources", |
219 ] | 218 ] |
220 sources = [ | 219 sources = [ |
221 "$target_gen_dir/web_view_resources.pak", | 220 "$target_gen_dir/web_view_resources.pak", |
222 ] | 221 ] |
223 outputs = [ | 222 outputs = [ |
224 "{{bundle_resources_dir}}/{{source_file_part}}", | 223 "{{bundle_resources_dir}}/{{source_file_part}}", |
225 ] | 224 ] |
226 } | 225 } |
227 | 226 |
228 action("generate_license") { | 227 if (additional_toolchains == [] || current_toolchain == default_toolchain) { |
229 _license_path = "$target_out_dir/LICENSE" | 228 _package_dir = "$root_out_dir/cronet_ios_web_view" |
230 | 229 |
231 script = "//tools/licenses.py" | 230 action("cronet_ios_web_view_generate_license") { |
232 inputs = [ | 231 _license_path = "$_package_dir/LICENSE" |
233 "//buildtools/$host_os/gn", | 232 |
234 ] | 233 script = "//tools/licenses.py" |
235 outputs = [ | 234 inputs = [ |
236 _license_path, | 235 "//buildtools/$host_os/gn", |
237 ] | 236 ] |
238 args = [ | 237 outputs = [ |
239 "license_file", | 238 _license_path, |
240 rebase_path(_license_path, root_build_dir), | 239 ] |
241 "--gn-target", | 240 args = [ |
242 "//ios/web_view", | 241 "license_file", |
243 "--gn-out-dir", | 242 rebase_path(_license_path, root_build_dir), |
244 ".", | 243 "--gn-target", |
245 ] | 244 "//ios/web_view", |
| 245 "--gn-out-dir", |
| 246 ".", |
| 247 ] |
| 248 } |
| 249 |
| 250 copy("cronet_ios_web_view_package_copy") { |
| 251 sources = [ |
| 252 "$root_out_dir/CronetChromeWebView.framework", |
| 253 "//AUTHORS", |
| 254 "//chrome/VERSION", |
| 255 ] |
| 256 outputs = [ |
| 257 "$_package_dir/{{source_file_part}}", |
| 258 ] |
| 259 |
| 260 deps = [ |
| 261 ":cronet_web_view_combined", |
| 262 ] |
| 263 } |
| 264 |
| 265 if (enable_dsyms) { |
| 266 action("cronet_ios_web_view_dsym_archive") { |
| 267 script = "//chrome/tools/build/mac/archive_symbols.py" |
| 268 |
| 269 # These are the dSYMs that will be archived. The sources list must be |
| 270 # the target outputs that correspond to the dSYMs (since a dSYM is a |
| 271 # directory it cannot be listed as a source file). The targets that |
| 272 # generate both the dSYM and binary image are listed in deps. |
| 273 _dsyms = [ "$root_out_dir/CronetChromeWebView.dSYM" ] |
| 274 |
| 275 sources = [ |
| 276 "$root_out_dir/CronetChromeWebView.framework", |
| 277 ] |
| 278 |
| 279 _output = "$_package_dir/CronetChromeWebView.dSYM.tar.bz2" |
| 280 |
| 281 outputs = [ |
| 282 _output, |
| 283 ] |
| 284 |
| 285 args = [ rebase_path(_output, root_out_dir) ] + |
| 286 rebase_path(_dsyms, root_out_dir) |
| 287 |
| 288 deps = [ |
| 289 ":cronet_web_view_combined", |
| 290 ] |
| 291 } |
| 292 } else { |
| 293 group("cronet_ios_web_view_dsym_archive") { |
| 294 } |
| 295 } |
| 296 |
| 297 group("cronet_ios_web_view_package") { |
| 298 deps = [ |
| 299 ":cronet_ios_web_view_dsym_archive", |
| 300 ":cronet_ios_web_view_generate_license", |
| 301 ":cronet_ios_web_view_package_copy", |
| 302 ] |
| 303 } |
246 } | 304 } |
OLD | NEW |