1# Copyright (C) 2022-2023 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
16asacfwk_path = "../../../frameworks/asacfwk"
17
18config("accessibilityclient_private_config") {
19  visibility = [ ":*" ]
20
21  include_dirs = [
22    "${asacfwk_path}/include",
23    "../../../common/log/include",
24  ]
25
26  defines = [
27    "AAMS_LOG_TAG = \"accessibility_asacfwk\"",
28    "AAMS_LOG_DOMAIN = 0xD001D02",
29  ]
30
31  if (build_variant == "user") {
32    defines += [ "RELEASE_VERSION" ]
33  }
34}
35
36config("accessibilityclient_public_config") {
37  include_dirs = [ "include" ]
38}
39
40asacfwk_src = [
41  "${asacfwk_path}/src/accessibility_system_ability_client_impl.cpp",
42  "${asacfwk_path}/src/accessibility_element_operator_impl.cpp",
43]
44
45ohos_shared_library("accessibilityclient") {
46  branch_protector_ret = "pac_ret"
47  sanitize = {
48    integer_overflow = true
49    ubsan = true
50    boundary_sanitize = true
51    cfi = false
52    cfi_cross_dso = false
53    debug = false
54  }
55
56  sources = asacfwk_src
57  configs = [
58    ":accessibilityclient_private_config",
59    "../../../resources/config/build:coverage_flags",
60  ]
61
62  public_configs = [ ":accessibilityclient_public_config" ]
63
64  deps = [
65    "../../../common/interface:accessibility_interface",
66    "../common:accessibility_common",
67  ]
68
69  external_deps = [
70    "c_utils:utils",
71    "ffrt:libffrt",
72    "hilog:libhilog",
73    "init:libbeget_proxy",
74    "init:libbegetutil",
75    "ipc:ipc_single",
76    "samgr:samgr_proxy",
77  ]
78  innerapi_tags = [ "platformsdk" ]
79  install_enable = true
80
81  subsystem_name = "barrierfree"
82  part_name = "accessibility"
83}
84