1# Copyright (c) 2021-2022 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("//build/test.gni")
16import("../../multimodalinput_mini.gni")
17
18ohos_source_set("input-manager") {
19  sources = [ "src/input_manager_command.cpp" ]
20  branch_protector_ret = "pac_ret"
21  sanitize = {
22    cfi = true
23    cfi_cross_dso = true
24    debug = false
25  }
26  include_dirs = [
27    "include",
28    "${mmi_path}/util/common/include",
29  ]
30
31  deps = [
32    "${mmi_path}/frameworks/proxy:libmmi-client",
33    "${mmi_path}/util:libmmi-util",
34  ]
35
36  external_deps = [
37    "c_utils:utils",
38    "hilog:libhilog",
39    "image_framework:image_native",
40    "init:libbegetutil",
41  ]
42  subsystem_name = "multimodalinput"
43  part_name = "input"
44}
45
46ohos_executable("uinput") {
47  sources = [ "src/main.cpp" ]
48  configs = [ "${mmi_path}:coverage_flags" ]
49  include_dirs = [
50    "include",
51    "${mmi_path}/interfaces/native/innerkits/event/include",
52  ]
53  branch_protector_ret = "pac_ret"
54  sanitize = {
55    cfi = true
56    cfi_cross_dso = true
57    debug = false
58  }
59  deps = [ "${mmi_path}/tools/inject_event:input-manager" ]
60  external_deps = [
61    "c_utils:utils",
62    "hilog:libhilog",
63  ]
64  subsystem_name = "multimodalinput"
65  part_name = "input"
66}
67
68module_output_path = "multimodalinput/mmi_unit_out"
69ohos_unittest("InjectEventTest") {
70  module_out_path = module_output_path
71  configs = [ "${mmi_path}:coverage_flags" ]
72  include_dirs = [ "include" ]
73
74  sources = [ "test/inject_event_test.cpp" ]
75
76  deps = [
77    "${mmi_path}/frameworks/proxy:libmmi-client",
78    "${mmi_path}/tools/inject_event:input-manager",
79    "${mmi_path}/util:libmmi-util",
80  ]
81
82  external_deps = [
83    "c_utils:utils",
84    "hilog:libhilog",
85    "image_framework:image_native",
86  ]
87}
88
89group("inject_event") {
90  testonly = true
91  deps = [ ":InjectEventTest" ]
92}
93