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}/src/accessibility_ability_info.cpp", 39 "${accessibility_common_path}/src/accessibility_caption.cpp", 40 "${accessibility_common_path}/src/accessibility_constants.cpp", 41 "${accessibility_common_path}/src/accessibility_element_info.cpp", 42 "${accessibility_common_path}/src/accessibility_event_info.cpp", 43 "${accessibility_common_path}/src/accessibility_permission.cpp", 44 "${accessibility_common_path}/src/accessibility_window_info.cpp", 45 "${accessibility_common_path}/src/accessibility_gesture_inject_path.cpp", 46] 47 48ohos_shared_library("accessibility_common") { 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 = accessibility_common_src 60 configs = [ 61 ":accessibility_common_private_config", 62 "../../../resources/config/build:coverage_flags", 63 ] 64 65 public_configs = [ ":accessibility_common_public_config" ] 66 67 install_enable = true 68 69 external_deps = [ 70 "access_token:libaccesstoken_sdk", 71 "access_token:libtokenid_sdk", 72 "c_utils:utils", 73 "hilog:libhilog", 74 "input:libmmi-client", 75 "ipc:ipc_single", 76 "runtime_core:ani", 77 ] 78 innerapi_tags = [ "platformsdk" ] 79 subsystem_name = "barrierfree" 80 part_name = "accessibility" 81} 82