1#
2#  Copyright 2021 Google, Inc.
3#
4#  Licensed under the Apache License, Version 2.0 (the "License");
5#  you may not use this file except in compliance with the License.
6#  You may obtain a copy of the License at:
7#
8#  http://www.apache.org/licenses/LICENSE-2.0
9#
10#  Unless required by applicable law or agreed to in writing, software
11#  distributed under the License is distributed on an "AS IS" BASIS,
12#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13#  See the License for the specific language governing permissions and
14#  limitations under the License.
15#
16
17source_set("BluetoothMetricsSources_chromeos") {
18  sources = [
19    "chromeos/metrics.cc",
20    "chromeos/metrics_allowlist.cc",
21    "chromeos/metrics_event.cc",
22  ]
23
24  deps = [ "//bt/system/gd:gd_default_deps" ]
25  configs += [
26    "//bt/system/gd:gd_defaults",
27    "//bt/system/log:log_defaults",
28  ]
29}
30
31source_set("BluetoothMetricsSources_linux") {
32  sources = [ "linux/metrics.cc" ]
33  configs += [
34    "//bt/system/gd:gd_defaults",
35    "//bt/system/log:log_defaults",
36  ]
37}
38
39source_set("BluetoothMetricsSources") {
40  sources = [
41    "counter_metrics.cc",
42    "utils.cc",
43    "metrics_state.cc"
44  ]
45
46  configs += [
47    "//bt/system/gd:gd_defaults",
48    "//bt/system/log:log_defaults",
49  ]
50  deps = [ "//bt/system/gd:gd_default_deps" ]
51
52  if (target_os == "chromeos") {
53    deps += [ ":BluetoothMetricsSources_chromeos" ]
54  } else {
55    deps += [ ":BluetoothMetricsSources_linux" ]
56  }
57}
58