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("//build/ohos.gni")
15
16declare_args() {
17  battery_manager_feature_set_low_capacity_threshold = false
18  battery_manager_feature_enable_charger = false
19}
20
21defines = []
22if (!defined(global_parts_info) ||
23    defined(global_parts_info.hiviewdfx_hisysevent)) {
24  has_hiviewdfx_hisysevent_part = true
25  defines += [ "HAS_HIVIEWDFX_HISYSEVENT_PART" ]
26} else {
27  has_hiviewdfx_hisysevent_part = false
28}
29
30if (!defined(global_parts_info) ||
31    defined(global_parts_info.sensors_miscdevice)) {
32  has_sensors_miscdevice_part = true
33  defines += [ "HAS_SENSORS_MISCDEVICE_PART" ]
34} else {
35  has_sensors_miscdevice_part = false
36}
37
38if (!defined(global_parts_info) ||
39    defined(global_parts_info.hdf_drivers_interface_display)) {
40  has_drivers_interface_display_part = true
41} else {
42  has_drivers_interface_display_part = false
43}
44
45if (!defined(global_parts_info) ||
46    defined(global_parts_info.hdf_drivers_interface_light)) {
47  has_drivers_interface_light_part = true
48} else {
49  has_drivers_interface_light_part = false
50}
51
52if (!defined(global_parts_info) ||
53    defined(global_parts_info.graphic_graphic_surface)) {
54  has_graphic_surface_part = true
55} else {
56  has_graphic_surface_part = false
57}
58
59if (!defined(global_parts_info) || defined(global_parts_info.arkui_ui_lite)) {
60  has_ui_lite_part = true
61} else {
62  has_ui_lite_part = false
63}
64
65if (!defined(global_parts_info) ||
66    defined(global_parts_info.customization_config_policy)) {
67  has_battery_config_policy_part = true
68} else {
69  has_battery_config_policy_part = false
70}
71
72ability_runtime_path = "//foundation/ability/ability_runtime"
73ability_runtime_napi_path = "${ability_runtime_path}/frameworks/js/napi"
74ability_runtime_inner_api_path = "${ability_runtime_path}/interfaces/inner_api"
75ability_runtime_services_path = "${ability_runtime_path}/services"
76batterymgr_native_part_name = "battery_manager"
77module_output_path = "${batterymgr_native_part_name}/battery_manager"
78battery_manager_path = "//base/powermgr/battery_manager"
79battery_inner_api = "${battery_manager_path}/interfaces/inner_api"
80battery_frameworks = "${battery_manager_path}/frameworks"
81battery_service = "${battery_manager_path}/services"
82battery_service_native = "${battery_service}/native"
83battery_service_zidl = "${battery_service}/zidl"
84battery_utils = "${battery_manager_path}/utils"
85