1# Copyright (C) 2022 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 16accessibility_common_path = "../../../frameworks/common" 17 18config("accessibility_common_private_config") { 19 visibility = [ ":*" ] 20 21 include_dirs = [ "../../../common/log/include" ] 22 23 defines = [ 24 "AAMS_LOG_TAG = \"accessibility_common\"", 25 "AAMS_LOG_DOMAIN = 0xD001D04", 26 ] 27 28 if (build_variant == "user") { 29 defines += [ "RELEASE_VERSION" ] 30 } 31} 32 33config("accessibility_common_public_config") { 34 include_dirs = [ "include" ] 35} 36 37accessibility_common_src = [ 38 "${accessibility_common_path}/../../interfaces/kits/napi/src/napi_accessibility_utils.cpp", 39 "${accessibility_common_path}/src/accessibility_ability_info.cpp", 40 "${accessibility_common_path}/src/accessibility_caption.cpp", 41 "${accessibility_common_path}/src/accessibility_constants.cpp", 42 "${accessibility_common_path}/src/accessibility_element_info.cpp", 43 "${accessibility_common_path}/src/accessibility_event_info.cpp", 44 "${accessibility_common_path}/src/accessibility_permission.cpp", 45 "${accessibility_common_path}/src/accessibility_window_info.cpp", 46 "${accessibility_common_path}/src/accessibility_gesture_inject_path.cpp", 47] 48 49ohos_shared_library("accessibility_common") { 50 branch_protector_ret = "pac_ret" 51 sanitize = { 52 integer_overflow = true 53 ubsan = true 54 boundary_sanitize = true 55 cfi = true 56 cfi_cross_dso = true 57 debug = false 58 } 59 60 sources = accessibility_common_src 61 configs = [ 62 ":accessibility_common_private_config", 63 "../../../resources/config/build:coverage_flags", 64 ] 65 66 public_configs = [ ":accessibility_common_public_config" ] 67 68 install_enable = true 69 70 external_deps = [ 71 "access_token:libaccesstoken_sdk", 72 "access_token:libtokenid_sdk", 73 "hilog:libhilog", 74 "input:libmmi-client", 75 "ipc:ipc_single", 76 "napi:ace_napi", 77 ] 78 innerapi_tags = [ "platformsdk" ] 79 subsystem_name = "barrierfree" 80 part_name = "accessibility" 81} 82