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_lite/batterymgr.gni")
15import("//build/lite/config/component/lite_component.gni")
16
17local_include_dirs = []
18local_deps = []
19
20if (battery_mini_system) {
21  local_include_dirs += [
22    "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite",
23    "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr",
24  ]
25  local_deps +=
26      [ "//base/powermgr/battery_lite/frameworks/native/src/mini:battery_impl" ]
27} else {
28  local_include_dirs +=
29      [ "//foundation/communication/ipc/interfaces/innerkits/c/ipc/include" ]
30  local_deps += [
31    "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
32    "//base/powermgr/battery_lite/frameworks/native/src/small:battery_impl",
33    "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single",
34  ]
35}
36
37config("batterymgr_public_config") {
38  include_dirs = [
39    "${batterymgr_innerkits_path}",
40    "${batterymgr_kits_path}",
41  ]
42}
43
44lite_library("batterymgr") {
45  target_type = battery_library_type
46
47  sources = []
48
49  include_dirs = [
50    "include",
51    "include/${battery_system_type}",
52    "//commonlibrary/utils_lite/include",
53  ]
54  include_dirs += local_include_dirs
55
56  public_configs = [ ":batterymgr_public_config" ]
57
58  deps = [ "//foundation/systemabilitymgr/samgr_lite/samgr:samgr" ]
59  deps += local_deps
60}
61