• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_feature_data_share = true
20  accessibility_use_rosen_drawing = 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  if (defined(global_parts_info) &&
36      !defined(global_parts_info.distributeddatamgr_data_share)) {
37    distributeddatamgr_data_share = false
38  }
39}
40
41print(
42    "accessibility_feature_display_manager = ${accessibility_feature_display_manager}")
43print(
44    "accessibility_feature_power_manager = ${accessibility_feature_power_manager}")
45print("accessibility_use_rosen_drawing = ${accessibility_use_rosen_drawing}")
46print("accessibility_feature_data_share = ${accessibility_feature_data_share}")
47
48accessibility_default_defines = []
49
50if (accessibility_feature_power_manager) {
51  accessibility_default_defines += [ "OHOS_BUILD_ENABLE_POWER_MANAGER" ]
52}
53
54if (accessibility_feature_display_manager) {
55  accessibility_default_defines += [ "OHOS_BUILD_ENABLE_DISPLAY_MANAGER" ]
56}
57
58if (accessibility_use_rosen_drawing) {
59  accessibility_default_defines += [ "USE_ROSEN_DRAWING" ]
60}
61
62if (accessibility_feature_data_share) {
63  accessibility_default_defines += [ "OHOS_BUILD_ENABLE_DATA_SHARE" ]
64}
65