1885b47fbSopenharmony_ci# Copyright (C) 2022-2023 Huawei Device Co., Ltd.
2885b47fbSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3885b47fbSopenharmony_ci# you may not use this file except in compliance with the License.
4885b47fbSopenharmony_ci# You may obtain a copy of the License at
5885b47fbSopenharmony_ci#
6885b47fbSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7885b47fbSopenharmony_ci#
8885b47fbSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9885b47fbSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10885b47fbSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11885b47fbSopenharmony_ci# See the License for the specific language governing permissions and
12885b47fbSopenharmony_ci# limitations under the License.
13885b47fbSopenharmony_ci
14885b47fbSopenharmony_ciimport("//build/ohos.gni")
15885b47fbSopenharmony_ciimport("../../../accessibility_aafwk.gni")
16885b47fbSopenharmony_ciimport("../../../accessibility_manager_service.gni")
17885b47fbSopenharmony_ci
18885b47fbSopenharmony_ciaafwk_path = "../../../frameworks/aafwk"
19885b47fbSopenharmony_ci
20885b47fbSopenharmony_ciconfig("accessibleability_private_config") {
21885b47fbSopenharmony_ci  visibility = [ ":*" ]
22885b47fbSopenharmony_ci
23885b47fbSopenharmony_ci  include_dirs = [
24885b47fbSopenharmony_ci    "${aafwk_path}/include",
25885b47fbSopenharmony_ci    "../../../common/log/include",
26885b47fbSopenharmony_ci  ]
27885b47fbSopenharmony_ci
28885b47fbSopenharmony_ci  defines = [
29885b47fbSopenharmony_ci    "AAMS_LOG_TAG = \"accessibility_aakit\"",
30885b47fbSopenharmony_ci    "AAMS_LOG_DOMAIN = 0xD001D01",
31885b47fbSopenharmony_ci  ]
32885b47fbSopenharmony_ci
33885b47fbSopenharmony_ci  defines += accessibility_default_defines
34885b47fbSopenharmony_ci
35885b47fbSopenharmony_ci  if (build_variant == "user") {
36885b47fbSopenharmony_ci    defines += [ "RELEASE_VERSION" ]
37885b47fbSopenharmony_ci  }
38885b47fbSopenharmony_ci}
39885b47fbSopenharmony_ci
40885b47fbSopenharmony_ciconfig("accessibleability_public_config") {
41885b47fbSopenharmony_ci  include_dirs = [ "include" ]
42885b47fbSopenharmony_ci}
43885b47fbSopenharmony_ci
44885b47fbSopenharmony_ciaafwk_files = [
45885b47fbSopenharmony_ci  "${aafwk_path}/src/accessibility_element_operator_callback_impl.cpp",
46885b47fbSopenharmony_ci  "${aafwk_path}/src/accessibility_ui_test_ability_impl.cpp",
47885b47fbSopenharmony_ci  "${aafwk_path}/src/accessible_ability_channel_client.cpp",
48885b47fbSopenharmony_ci  "${aafwk_path}/src/accessible_ability_client_impl.cpp",
49885b47fbSopenharmony_ci]
50885b47fbSopenharmony_ci
51885b47fbSopenharmony_ciohos_shared_library("accessibleability") {
52885b47fbSopenharmony_ci  branch_protector_ret = "pac_ret"
53885b47fbSopenharmony_ci  sanitize = {
54885b47fbSopenharmony_ci    integer_overflow = true
55885b47fbSopenharmony_ci    ubsan = true
56885b47fbSopenharmony_ci    boundary_sanitize = true
57885b47fbSopenharmony_ci    cfi = false
58885b47fbSopenharmony_ci    cfi_cross_dso = false
59885b47fbSopenharmony_ci    debug = false
60885b47fbSopenharmony_ci  }
61885b47fbSopenharmony_ci
62885b47fbSopenharmony_ci  sources = aafwk_files
63885b47fbSopenharmony_ci  configs = [ ":accessibleability_private_config" ]
64885b47fbSopenharmony_ci
65885b47fbSopenharmony_ci  public_configs = [
66885b47fbSopenharmony_ci    ":accessibleability_public_config",
67885b47fbSopenharmony_ci    "../../../resources/config/build:coverage_flags",
68885b47fbSopenharmony_ci  ]
69885b47fbSopenharmony_ci
70885b47fbSopenharmony_ci  deps = [
71885b47fbSopenharmony_ci    "../../../common/interface:accessibility_interface",
72885b47fbSopenharmony_ci    "../common:accessibility_common",
73885b47fbSopenharmony_ci  ]
74885b47fbSopenharmony_ci
75885b47fbSopenharmony_ci  external_deps = [
76885b47fbSopenharmony_ci    "c_utils:utils",
77885b47fbSopenharmony_ci    "ffrt:libffrt",
78885b47fbSopenharmony_ci    "hilog:libhilog",
79885b47fbSopenharmony_ci    "init:libbeget_proxy",
80885b47fbSopenharmony_ci    "init:libbegetutil",
81885b47fbSopenharmony_ci    "input:libmmi-client",
82885b47fbSopenharmony_ci    "ipc:ipc_single",
83885b47fbSopenharmony_ci    "samgr:samgr_proxy",
84885b47fbSopenharmony_ci  ]
85885b47fbSopenharmony_ci
86885b47fbSopenharmony_ci  if (accessibility_feature_hiviewdfx_hitrace) {
87885b47fbSopenharmony_ci    external_deps += [ "hitrace:hitrace_meter" ]
88885b47fbSopenharmony_ci  }
89885b47fbSopenharmony_ci
90885b47fbSopenharmony_ci  install_enable = true
91885b47fbSopenharmony_ci
92885b47fbSopenharmony_ci  subsystem_name = "barrierfree"
93885b47fbSopenharmony_ci  part_name = "accessibility"
94885b47fbSopenharmony_ci}
95