| # Copyright 2017 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/package.gni") |
| import("//third_party/cobalt_config/cobalt_config.gni") |
| import("//third_party/protobuf/proto_library.gni") |
| |
| executable("system-metrics") { |
| output_name = "cobalt_system_metrics_bin" |
| |
| sources = [ |
| "system_metrics_main.cc", |
| ] |
| |
| deps = [ |
| "//garnet/public/lib/component/cpp", |
| "//garnet/public/lib/fsl", |
| "//zircon/public/fidl/fuchsia-cobalt", |
| "//zircon/public/fidl/fuchsia-sysinfo:fuchsia-sysinfo_c", |
| "//zircon/public/lib/async-loop-cpp", |
| ] |
| } |
| |
| cobalt_config("generate_system_metrics_config") { |
| project_id = 102 |
| } |
| |
| package("cobalt_system_metrics") { |
| deps = [ |
| ":generate_system_metrics_config", |
| ":system-metrics", |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/cobalt_system_metrics.cmx") |
| dest = "cobalt_system_metrics.cmx" |
| }, |
| ] |
| |
| resources = [ |
| { |
| path = rebase_path( |
| get_label_info(":generate_system_metrics_config", |
| "target_gen_dir") + "/cobalt_config.pb") |
| dest = "cobalt_config.pb" |
| }, |
| ] |
| |
| binary = "cobalt_system_metrics_bin" |
| } |