| # Copyright 2022 The ChromiumOS Authors | |
| # Use of this source code is governed by a BSD-style license that can be | |
| # found in the LICENSE file. | |
| import("//common-mk/pkg_config.gni") | |
| pkg_config("target_defaults") { | |
| pkg_deps = [ | |
| "libchrome", | |
| "libmetrics", | |
| ] | |
| } | |
| static_library("libanalytics") { | |
| sources = [ | |
| "metrics.cc", | |
| "metrics.h", | |
| "metrics_test_util.cc", | |
| "metrics_test_util.h", | |
| "registry.cc", | |
| "registry.h", | |
| "resource_collector.cc", | |
| "resource_collector.h", | |
| "resource_collector_cpu.cc", | |
| "resource_collector_cpu.h", | |
| "resource_collector_memory.cc", | |
| "resource_collector_memory.h", | |
| "resource_collector_storage.cc", | |
| "resource_collector_storage.h", | |
| ] | |
| configs += [ ":target_defaults" ] | |
| public_deps = [ | |
| "//missive/proto:libmissiveprotostatus", | |
| "//missive/resources:resource_manager", | |
| "//missive/util:time", | |
| ] | |
| } | |
| source_set("unit_tests") { | |
| sources = [ | |
| "metrics_test.cc", | |
| "registry_test.cc", | |
| "resource_collector_cpu_test.cc", | |
| "resource_collector_memory_test.cc", | |
| "resource_collector_mock.cc", | |
| "resource_collector_mock.h", | |
| "resource_collector_storage_test.cc", | |
| "resource_collector_test.cc", | |
| ] | |
| deps = [ ":libanalytics" ] | |
| configs += [ ":target_defaults" ] | |
| } |