1# Copyright (C) 2025 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") 15import("../../accessibility_manager_service.gni") 16 17services_ext_path = "./" 18 19config("aams_ext_config") { 20 visibility = [ ":*" ] 21 22 include_dirs = [ 23 "include", 24 "../../common/log/include", 25 "../aams/include", 26 ] 27 28 defines = [ 29 "AAMS_LOG_TAG = \"accessibility\"", 30 "AAMS_LOG_DOMAIN = 0xD001D00", 31 ] 32 33 if (build_variant == "user") { 34 defines += [ "RELEASE_VERSION" ] 35 } 36 37 defines += accessibility_default_defines 38} 39 40aams_ext_files = [ 41 "${services_ext_path}/src/magnification_window.cpp", 42 "${services_ext_path}/src/magnification_menu.cpp", 43 "${services_ext_path}/src/ext_utils.cpp", 44 "${services_ext_path}/src/accessibility_notification_helper.cpp", 45 "${services_ext_path}/src/export_api.cpp", 46] 47 48ohos_shared_library("aams_ext") { 49 branch_protector_ret = "pac_ret" 50 sanitize = { 51 integer_overflow = true 52 ubsan = true 53 boundary_sanitize = true 54 cfi = true 55 cfi_cross_dso = true 56 debug = false 57 } 58 59 sources = aams_ext_files 60 61 configs = [ 62 ":aams_ext_config", 63 "../../resources/config/build:coverage_flags", 64 ] 65 66 external_deps = [ 67 "ability_base:zuri", 68 "ability_runtime:wantagent_innerkits", 69 "c_utils:utils", 70 "graphic_2d:2d_graphics", 71 "graphic_2d:librender_service_client", 72 "graphic_2d:librender_service_base", 73 "hisysevent:libhisysevent", 74 "i18n:intl_util", 75 "os_account:os_account_innerkits", 76 "resource_management:global_resmgr", 77 "samgr:samgr_proxy", 78 "time_service:time_client", 79 "window_manager:libdm", 80 "window_manager:libwm", 81 ] 82 83 if (defined(global_parts_info) && 84 defined( 85 global_parts_info.notification_distributed_notification_service)) { 86 external_deps += [ "distributed_notification_service:ans_innerkits" ] 87 } 88 89 install_enable = true 90 91 subsystem_name = "barrierfree" 92 part_name = "accessibility" 93} 94