• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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/config/components/ets_frontend/ets2abc_config.gni")
15import("//build/ohos.gni")
16import("../../../multimodalinput_mini.gni")
17
18ohos_shared_library("ani_input_device") {
19  branch_protector_ret = "pac_ret"
20  sanitize = {
21    integer_overflow = true
22    ubsan = true
23    boundary_sanitize = true
24    cfi = true
25    cfi_cross_dso = true
26    debug = false
27  }
28
29  configs = [ "${mmi_path}:coverage_flags" ]
30
31  cflags_cc = [
32    "-Wno-unused-function",
33    "-Wno-unused-const-variable",
34  ]
35  sources = [
36    "src/ani_event_target.cpp",
37    "src/ani_input_device_context.cpp",
38    "src/ani_input_device_manager.cpp",
39    "src/ani_util.cpp",
40  ]
41
42  include_dirs = [
43    "include",
44    "${mmi_path}/util/common/include",
45    "${mmi_path}/tools/event_inject/include",
46    "${mmi_path}/interfaces/native/innerkits/proxy/include",
47  ]
48
49  deps = [
50    "${mmi_path}/frameworks/native/input:oh_input_manager",
51    "${mmi_path}/frameworks/proxy:libmmi-client",
52    "${mmi_path}/util:libmmi-util",
53  ]
54
55  external_deps = [
56    "c_utils:utils",
57    "eventhandler:libeventhandler",
58    "hilog:libhilog",
59    "ipc:ipc_core",
60    "runtime_core:ani",
61  ]
62
63  subsystem_name = "multimodalinput"
64  part_name = "input"
65  output_extension = "so"
66}
67
68generate_static_abc("input_device_abc") {
69  base_url = "./ets"
70  files = [ "./ets/@ohos.multimodalInput.inputDevice.ets" ]
71  dst_file = "$target_out_dir/input_device.abc"
72  out_puts = [ "$target_out_dir/input_device.abc" ]
73  is_boot_abc = "True"
74  device_dst_file = "/system/framework/input_device.abc"
75}
76
77ohos_prebuilt_etc("input_device_abc_etc") {
78  source = "$target_out_dir/input_device.abc"
79  module_install_dir = "framework"
80  subsystem_name = "multimodalinput"
81  part_name = "input"
82  deps = [ ":input_device_abc" ]
83}
84
85group("ani_input_device_package") {
86  deps = [
87    ":ani_input_device",
88    ":input_device_abc_etc",
89  ]
90}
91