• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2022 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("../../batterymgr.gni")
15
16config("batterynapi_private_config") {
17  include_dirs = [ "include" ]
18}
19
20ohos_shared_library("batteryinfo") {
21  sources = [
22    "src/battery_info.cpp",
23    "src/napi_error.cpp",
24    "src/napi_utils.cpp",
25  ]
26  configs = [
27    "${battery_utils}:utils_config",
28    ":batterynapi_private_config",
29  ]
30  deps = [ "${battery_inner_api}:batterysrv_client" ]
31  external_deps = [
32    "c_utils:utils",
33    "hilog:libhilog",
34    "ipc:ipc_core",
35    "napi:ace_napi",
36  ]
37
38  relative_install_dir = "module"
39
40  subsystem_name = "powermgr"
41  part_name = "battery_manager"
42}
43
44ohos_shared_library("charger") {
45  sources = [ "src/charger.cpp" ]
46  configs = [
47    "${battery_utils}:utils_config",
48    "${battery_utils}:coverage_flags",
49  ]
50  deps = [ "${battery_inner_api}:batterysrv_client" ]
51  external_deps = [
52    "c_utils:utils",
53    "hilog:libhilog",
54    "napi:ace_napi",
55  ]
56
57  relative_install_dir = "module"
58
59  subsystem_name = "powermgr"
60  part_name = "battery_manager"
61}
62
63ohos_shared_library("battery") {
64  sources = [ "src/system_battery.cpp" ]
65  configs = [
66    "${battery_utils}:utils_config",
67    "${battery_utils}:coverage_flags",
68    ":batterynapi_private_config",
69  ]
70  deps = [ "${battery_inner_api}:batterysrv_client" ]
71  external_deps = [
72    "c_utils:utils",
73    "hilog:libhilog",
74    "ipc:ipc_core",
75    "napi:ace_napi",
76  ]
77
78  relative_install_dir = "module"
79
80  subsystem_name = "powermgr"
81  part_name = "battery_manager"
82}
83