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