1# Copyright (C) 2022-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 17config("accessibility_extension_module_config") { 18 visibility = [ ":*" ] 19 20 include_dirs = [ 21 "../../../../common/log/include", 22 "../../../../common/interface/include", 23 "../../../innerkits/acfwk/include", 24 "include", 25 "../include", 26 ] 27 28 defines = [ 29 "AAMS_LOG_TAG = \"accessibility_napi\"", 30 "AAMS_LOG_DOMAIN = 0xD001D10", 31 ] 32 33 defines += accessibility_default_defines 34 35 if (build_variant == "user") { 36 defines += [ "RELEASE_VERSION" ] 37 } 38} 39 40ohos_shared_library("accessibility_extension_module") { 41 branch_protector_ret = "pac_ret" 42 sanitize = { 43 integer_overflow = true 44 ubsan = true 45 boundary_sanitize = true 46 cfi = false 47 cfi_cross_dso = false 48 debug = false 49 } 50 51 sources = [ 52 "src/accessibility_extension.cpp", 53 "src/accessibility_extension_context.cpp", 54 "src/accessibility_extension_module_loader.cpp", 55 "src/napi_accessibility_element.cpp", 56 "src/napi_accessibility_extension.cpp", 57 "src/napi_accessibility_extension_context.cpp", 58 ] 59 60 configs = [ ":accessibility_extension_module_config" ] 61 62 deps = [ 63 "../../../../common/interface:accessibility_interface", 64 "../../../innerkits/aafwk:accessibleability", 65 "./../../../innerkits/common:accessibility_common", 66 ] 67 68 external_deps = [ 69 "ability_base:want", 70 "ability_runtime:ability_context_native", 71 "ability_runtime:ability_manager", 72 "ability_runtime:abilitykit_native", 73 "ability_runtime:app_context", 74 "ability_runtime:extensionkit_native", 75 "ability_runtime:napi_common", 76 "ability_runtime:runtime", 77 "access_token:libaccesstoken_sdk", 78 "access_token:libtokenid_sdk", 79 "c_utils:utils", 80 "common_event_service:cesfwk_innerkits", 81 "ffrt:libffrt", 82 "hilog:libhilog", 83 "input:libmmi-client", 84 "ipc:ipc_core", 85 "ipc:ipc_napi", 86 "napi:ace_napi", 87 ] 88 89 relative_install_dir = "extensionability/" 90 subsystem_name = "barrierfree" 91 part_name = "accessibility" 92} 93