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")
15import("../../../accessibility_aafwk.gni")
16import("../../../accessibility_manager_service.gni")
17
18aafwk_path = "../../../frameworks/aafwk"
19
20config("accessibleability_private_config") {
21  visibility = [ ":*" ]
22
23  include_dirs = [
24    "${aafwk_path}/include",
25    "../../../common/log/include",
26  ]
27
28  defines = [
29    "AAMS_LOG_TAG = \"accessibility_aakit\"",
30    "AAMS_LOG_DOMAIN = 0xD001D01",
31  ]
32
33  defines += accessibility_default_defines
34
35  if (build_variant == "user") {
36    defines += [ "RELEASE_VERSION" ]
37  }
38}
39
40config("accessibleability_public_config") {
41  include_dirs = [ "include" ]
42}
43
44aafwk_files = [
45  "${aafwk_path}/src/accessibility_element_operator_callback_impl.cpp",
46  "${aafwk_path}/src/accessibility_ui_test_ability_impl.cpp",
47  "${aafwk_path}/src/accessible_ability_channel_client.cpp",
48  "${aafwk_path}/src/accessible_ability_client_impl.cpp",
49]
50
51ohos_shared_library("accessibleability") {
52  branch_protector_ret = "pac_ret"
53  sanitize = {
54    integer_overflow = true
55    ubsan = true
56    boundary_sanitize = true
57    cfi = false
58    cfi_cross_dso = false
59    debug = false
60  }
61
62  sources = aafwk_files
63  configs = [ ":accessibleability_private_config" ]
64
65  public_configs = [
66    ":accessibleability_public_config",
67    "../../../resources/config/build:coverage_flags",
68  ]
69
70  deps = [
71    "../../../common/interface:accessibility_interface",
72    "../common:accessibility_common",
73  ]
74
75  external_deps = [
76    "c_utils:utils",
77    "ffrt:libffrt",
78    "hilog:libhilog",
79    "hitrace:hitrace_meter",
80    "init:libbeget_proxy",
81    "init:libbegetutil",
82    "input:libmmi-client",
83    "ipc:ipc_single",
84    "samgr:samgr_proxy",
85  ]
86
87  install_enable = true
88
89  subsystem_name = "barrierfree"
90  part_name = "accessibility"
91}
92