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 16cj_accessibility_path = "./" 17 18config("cj_accessibility_private_config") { 19 visibility = [ ":*" ] 20 21 include_dirs = [ 22 "${cj_accessibility_path}/include", 23 "../../../common/log/include", 24 "../../../interfaces/innerkits/asacfwk/include", 25 "../../../interfaces/innerkits/common/include", 26 ] 27 28 defines = [ 29 "AAMS_LOG_TAG = \"cj_accessibility_ffi\"", 30 "AAMS_LOG_DOMAIN = 0xD001D05", 31 ] 32 33 if (build_variant == "user") { 34 defines += [ "RELEASE_VERSION" ] 35 } 36} 37 38config("cj_accessibility_ffi_public_config") { 39 include_dirs = [ "${cj_accessibility_path}/include" ] 40} 41 42cj_accessibility_ffi_src = [ 43 "${cj_accessibility_path}/src/cj_accessibility_ffi.cpp", 44 "${cj_accessibility_path}/src/cj_accessibility_utils.cpp", 45 "${cj_accessibility_path}/src/cj_accessibility_callback.cpp", 46] 47 48ohos_shared_library("cj_accessibility_ffi") { 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 = cj_accessibility_ffi_src 60 configs = [ 61 ":cj_accessibility_private_config", 62 "../../../resources/config/build:coverage_flags", 63 ] 64 65 public_configs = [ ":cj_accessibility_ffi_public_config" ] 66 67 deps = [ 68 "../../../common/interface:accessibility_interface", 69 "../../innerkits/acfwk:accessibilityconfig", 70 "../../innerkits/asacfwk:accessibilityclient", 71 "../../innerkits/common:accessibility_common", 72 ] 73 74 install_enable = true 75 76 external_deps = [ 77 "access_token:libaccesstoken_sdk", 78 "access_token:libtokenid_sdk", 79 "c_utils:utils", 80 "hilog:libhilog", 81 "input:libmmi-client", 82 "ipc:ipc_single", 83 "napi:ace_napi", 84 "napi:cj_bind_ffi", 85 "napi:cj_bind_native", 86 ] 87 innerapi_tags = [ "platformsdk" ] 88 subsystem_name = "barrierfree" 89 part_name = "accessibility" 90} 91