| # Copyright 2018 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| assert(is_fuchsia) |
| |
| import("//build/config/fuchsia/fidl_library.gni") |
| import("//build/util/process_version.gni") |
| |
| fidl_library("web_fidl") { |
| library_name = "web" |
| namespace = "chromium" |
| |
| sources = [ |
| "fidl/web/context.fidl", |
| "fidl/web/context_provider.fidl", |
| "fidl/web/frame.fidl", |
| "fidl/web/navigation_controller.fidl", |
| "fidl/web/navigation_event_observer.fidl", |
| ] |
| |
| public_deps = [ |
| "//third_party/fuchsia-sdk/sdk:sys", |
| "//third_party/fuchsia-sdk/sdk:ui_gfx", |
| ] |
| } |
| |
| fidl_library("cast_fidl") { |
| library_name = "cast" |
| namespace = "chromium" |
| |
| sources = [ |
| "fidl/cast/application_config.fidl", |
| "fidl/cast/cast_channel.fidl", |
| ] |
| |
| public_deps = [ |
| ":web_fidl", |
| ] |
| } |
| |
| # gn binary location. |
| if (host_os == "mac") { |
| _gn_path = "//buildtools/mac/gn" |
| } else if (host_os == "linux") { |
| _gn_path = "//buildtools/linux64/gn" |
| } |
| |
| # Build location where all Fuchsia archive source files are placed. |
| _artifact_root = "$root_out_dir/fuchsia_artifacts" |
| |
| # Produces a LICENSE file for webrunner and its transitive dependencies. |
| _license_path = "$_artifact_root/LICENSE" |
| action("license") { |
| script = "//tools/licenses.py" |
| inputs = [ |
| "$_gn_path", |
| ] |
| outputs = [ |
| _license_path, |
| ] |
| args = [ |
| "license_file", |
| rebase_path(_license_path, root_build_dir), |
| "--gn-target", |
| "//fuchsia/runners:web_runner_pkg", |
| "--gn-out-dir", |
| ".", |
| ] |
| } |
| |
| # Extracts the numeric Chrome build ID and writes it to a file in the output |
| # directory. |
| # |
| # To check out the repository on the commit where the build ID was generated, |
| # simply call `git checkout <build-id>`, and Git will check out the commit |
| # associated with the <build-id> tag. |
| process_version("build_id") { |
| template_file = "cipd/build_id.template" |
| sources = [ |
| "//chrome/VERSION", |
| ] |
| output = "$_artifact_root/build_id.txt" |
| process_only = true |
| } |
| |
| # Puts copies of files at the top level of the CIPD archive's structure. |
| copy("restaged_packages") { |
| sources = [ |
| "$root_gen_dir/fuchsia/engine/chromium/chromium.far", |
| "$root_gen_dir/fuchsia/http/http/http.far", |
| "$root_gen_dir/fuchsia/runners/cast_runner/cast_runner.far", |
| "$root_gen_dir/fuchsia/runners/web_runner/web_runner.far", |
| ] |
| outputs = [ |
| "$_artifact_root/{{source_file_part}}", |
| ] |
| deps = [ |
| "//fuchsia/engine:web_engine", |
| "//fuchsia/http:http_pkg", |
| "//fuchsia/runners:cast_runner_pkg", |
| "//fuchsia/runners:web_runner_pkg", |
| ] |
| } |
| |
| # Specifies the build steps that must be performed before the creation of |
| # a CIPD archive. |
| group("archive_sources") { |
| deps = [ |
| ":build_id", |
| ":license", |
| ":restaged_packages", |
| ] |
| } |
| |
| # Used by the top-level "gn_all" target to discover Fuchsia build targets. |
| group("gn_all") { |
| testonly = true |
| deps = [ |
| "base:cr_fuchsia_base_unittests", |
| "engine:web_engine", |
| "engine:web_engine_browsertests", |
| "engine:web_engine_unittests", |
| "http:http_service_tests", |
| "runners:cast_runner", |
| "runners:cast_runner_browsertests", |
| "runners:cast_runner_integration_tests", |
| "runners:web_runner", |
| ] |
| } |