• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022-2025 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_manager_service.gni")
16
17ohos_shared_library("accessibility_napi") {
18  branch_protector_ret = "pac_ret"
19  sanitize = {
20    integer_overflow = true
21    ubsan = true
22    boundary_sanitize = true
23    cfi = false
24    cfi_cross_dso = false
25    debug = false
26  }
27
28  include_dirs = [
29    "../../../common/log/include",
30    "./include",
31    "../../../common/interface/include",
32  ]
33
34  defines = [
35    "AAMS_LOG_TAG = \"accessibility_napi\"",
36    "AAMS_LOG_DOMAIN = 0xD001D10",
37  ]
38
39  defines += accessibility_default_defines
40
41  if (build_variant == "user") {
42    defines += [ "RELEASE_VERSION" ]
43  }
44
45  sources = [
46    "./src/napi_accessibility_utils.cpp",
47    "./src/napi_accessibility_event_info.cpp",
48    "./src/napi_accessibility_system_ability_client.cpp",
49    "./src/native_module.cpp",
50    "./accessibility_config/src/napi_accessibility_config_observer.cpp",
51  ]
52
53  configs = [ "../../../resources/config/build:coverage_flags" ]
54
55  deps = [
56    "../../../common/interface:accessibility_interface",
57    "../../innerkits/acfwk:accessibilityconfig",
58    "../../innerkits/asacfwk:accessibilityclient",
59    "../../innerkits/common:accessibility_common",
60  ]
61
62  external_deps = [
63    "c_utils:utils",
64    "e2fsprogs:libext2_uuid",
65    "ffrt:libffrt",
66    "hilog:libhilog",
67    "input:libmmi-client",
68    "napi:ace_napi",
69  ]
70
71  if (product_name != "qemu-arm-linux-min") {
72    external_deps += [ "hiappevent:hiappevent_innerapi" ]
73  }
74
75  relative_install_dir = "module"
76  subsystem_name = "barrierfree"
77  part_name = "accessibility"
78}
79
80group("napi_packages") {
81  deps = [
82    ":accessibility_napi",
83    "accessibility_config:config_napi",
84    "accessibility_extension:accessibilityextensionability_napi",
85    "accessibility_extension_context:accessibilityextensioncontext_napi",
86    "accessibility_extension_module_loader:accessibility_extension_module",
87    "accessibility_gesture_path:gesturepath_napi",
88    "accessibility_gesture_point:gesturepoint_napi",
89  ]
90}
91