• 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("//base/powermgr/battery_manager/batterymgr.gni")
15
16config("batterynapi_private_config") {
17  include_dirs = [
18    "//foundation/ace/napi/native_engine",
19    "//foundation/ace/napi/interfaces/kits",
20    "//utils/system/safwk/native/include",
21    "//third_party/node/src",
22    "//base/powermgr/battery_manager/interfaces/innerkits/native/include",
23    "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy/include",
24    "//foundation/distributedschedule/samgr/adapter/interfaces/innerkits/include",
25  ]
26}
27
28ohos_shared_library("batteryinfo") {
29  sources = [ "battery_info.cpp" ]
30  configs = [
31    "${utils_path}:utils_config",
32    ":batterynapi_private_config",
33  ]
34  deps = [
35    "//base/powermgr/battery_manager/interfaces/innerkits:batterysrv_client",
36    "//foundation/ace/napi:ace_napi",
37  ]
38  external_deps = [
39    "hiviewdfx_hilog_native:libhilog",
40    "ipc:ipc_core",
41  ]
42
43  relative_install_dir = "module"
44
45  subsystem_name = "powermgr"
46  part_name = "battery_manager_native"
47}
48
49ohos_shared_library("battery") {
50  sources = [ "system_battery.cpp" ]
51  configs = [ "${utils_path}:utils_config" ]
52  deps = [
53    "//base/powermgr/battery_manager/interfaces/innerkits:batterysrv_client",
54    "//foundation/ace/napi:ace_napi",
55  ]
56  external_deps = [
57    "hiviewdfx_hilog_native:libhilog",
58    "ipc:ipc_core",
59  ]
60
61  relative_install_dir = "module"
62
63  subsystem_name = "powermgr"
64  part_name = "battery_manager_native"
65}
66