1# Copyright (c) 2023 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  accessibility_feature_power_manager = true
18  accessibility_feature_display_manager = true
19  accessibility_use_rosen_drawing = false
20  accessibility_watch_feature = false
21  if (defined(global_parts_info) &&
22      !defined(global_parts_info.powermgr_display_manager)) {
23    accessibility_feature_display_manager = false
24  }
25
26  if (defined(global_parts_info) &&
27      !defined(global_parts_info.powermgr_power_manager)) {
28    accessibility_feature_power_manager = false
29  }
30
31  if (defined(use_rosen_drawing) && use_rosen_drawing) {
32    accessibility_use_rosen_drawing = true
33  }
34}
35
36print(
37    "accessibility_feature_display_manager = ${accessibility_feature_display_manager}")
38print(
39    "accessibility_feature_power_manager = ${accessibility_feature_power_manager}")
40print("accessibility_use_rosen_drawing = ${accessibility_use_rosen_drawing}")
41
42accessibility_default_defines = []
43
44if (accessibility_feature_power_manager) {
45  accessibility_default_defines += [ "OHOS_BUILD_ENABLE_POWER_MANAGER" ]
46}
47
48if (accessibility_feature_display_manager) {
49  accessibility_default_defines += [ "OHOS_BUILD_ENABLE_DISPLAY_MANAGER" ]
50}
51
52if (accessibility_use_rosen_drawing) {
53  accessibility_default_defines += [ "USE_ROSEN_DRAWING" ]
54}
55
56if (defined(accessibility_watch_feature) && accessibility_watch_feature) {
57  accessibility_default_defines += [ "ACCESSIBILITY_WATCH_FEATURE" ]
58}
59