• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("../../batterystats.gni")
15
16config("batterystats_public_config") {
17  include_dirs = [ "include" ]
18}
19
20ohos_shared_library("batterystats_client") {
21  sanitize = {
22    cfi = true
23    cfi_cross_dso = true
24    debug = false
25  }
26
27  sources = [
28    "${batterystats_frameworks_path}/native/src/battery_stats_client.cpp",
29    "${batterystats_frameworks_path}/native/src/battery_stats_info.cpp",
30  ]
31
32  configs = [
33    "${batterystats_service_path}:batterystats_public_config",
34    "${batterystats_utils_path}:batterystats_utils_config",
35    ":batterystats_public_config",
36    "${batterystats_utils_path}:coverage_flags",
37  ]
38
39  public_configs = [
40    "${batterystats_service_path}:batterystats_public_config",
41    ":batterystats_public_config",
42  ]
43
44  deps = [
45    "${batterystats_service_path}:batterystats_proxy",
46    "${batterystats_utils_path}:batterystats_utils",
47  ]
48
49  external_deps = [
50    "c_utils:utils",
51    "hilog:libhilog",
52    "ipc:ipc_core",
53    "samgr:samgr_proxy",
54  ]
55
56  subsystem_name = "powermgr"
57  part_name = "${batterystats_part_name}"
58}
59