| # Copyright 2019 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/config.gni") |
| import("//build/packages/prebuilt_package_with_flavors.gni") |
| import("//src/chromium/build_args.gni") |
| |
| prebuilt_archive_base_path = "//prebuilt/third_party/cast_runner" |
| debug_archive_base_path = "//prebuilt/build_ids/" + target_cpu + "/chromium" |
| |
| # TODO(fxbug.dev/70573): Remove when use_cast_runner_canary is deprecated. |
| if (use_cast_runner_canary) { |
| package_flavor_selections += [ |
| { |
| name = "cast_runner_pkg" |
| flavor = "canary" |
| }, |
| ] |
| } |
| |
| if (chromium_build_dir != "") { |
| package_flavor_selections += [ |
| { |
| name = "cast_runner_pkg" |
| flavor = "custom" |
| }, |
| ] |
| } |
| |
| group("cast") { |
| public_deps = [ ":cast_runner" ] |
| } |
| |
| group("cast_runner") { |
| deps = [ |
| ":cast_runner_config", |
| ":cast_runner_pkg", |
| ] |
| } |
| |
| config_data("cast_runner_config") { |
| visibility = [ ":cast_runner" ] |
| |
| for_pkg = "appmgr" |
| |
| sources = [ "config/cast_scheme_map.config" ] |
| |
| outputs = [ "scheme_map/cast.config" ] |
| } |
| |
| prebuilt_package_with_flavors("cast_runner_pkg") { |
| visibility = [ ":cast_runner" ] |
| package_name = "cast_runner" |
| default = "release" |
| flavors = [ |
| { |
| name = "release" |
| archive = prebuilt_archive_base_path + "/arch/" + target_cpu + |
| "/cast_runner.far" |
| production_safe = true |
| debug_archive = debug_archive_base_path + "/cast_runner.symbols.tar.bz2" |
| }, |
| { |
| name = "canary" |
| archive = prebuilt_archive_base_path + "_latest" + "/arch/" + target_cpu + |
| "/cast_runner.far" |
| production_safe = true |
| debug_archive = |
| debug_archive_base_path + "_latest" + "/cast_runner.symbols.tar.bz2" |
| }, |
| { |
| name = "custom" |
| archive = |
| chromium_build_dir + "/gen/fuchsia/engine/cast_runner/cast_runner.far" |
| debug_archive = debug_archive_base_path + "/cast_runner.symbols.tar.bz2" |
| }, |
| ] |
| selections = package_flavor_selections |
| } |