• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    "${mmi_path}/frameworks/proxy/events/include",
30    "${mmi_path}/frameworks/proxy/event_handler/include",
31    "${mmi_path}/frameworks/proxy/module_loader/include",
32    "${mmi_path}/service/event_handler/include",
33  ]
34
35  deps = [
36    "${mmi_path}/frameworks/proxy:libmmi-client",
37    "${mmi_path}/util:libmmi-util",
38  ]
39
40  external_deps = [
41    "c_utils:utils",
42    "eventhandler:libeventhandler",
43    "hilog:libhilog",
44    "image_framework:image_native",
45    "init:libbegetutil",
46    "ipc:ipc_core",
47  ]
48  subsystem_name = "multimodalinput"
49  part_name = "input"
50}
51
52ohos_executable("uinput") {
53  sources = [ "src/main.cpp" ]
54  configs = [ "${mmi_path}:coverage_flags" ]
55  include_dirs = [
56    "include",
57    "${mmi_path}/interfaces/native/innerkits/event/include",
58  ]
59  branch_protector_ret = "pac_ret"
60  sanitize = {
61    cfi = true
62    cfi_cross_dso = true
63    debug = false
64  }
65  deps = [ "${mmi_path}/tools/inject_event:input-manager" ]
66  external_deps = [
67    "c_utils:utils",
68    "hilog:libhilog",
69  ]
70  subsystem_name = "multimodalinput"
71  part_name = "input"
72}
73
74module_output_path = "multimodalinput/mmi_unit_out"
75ohos_unittest("InjectEventTest") {
76  module_out_path = module_output_path
77  configs = [ "${mmi_path}:coverage_flags" ]
78  include_dirs = [ "include" ]
79
80  sources = [ "test/inject_event_test.cpp" ]
81
82  deps = [
83    "${mmi_path}/frameworks/proxy:libmmi-client",
84    "${mmi_path}/tools/inject_event:input-manager",
85    "${mmi_path}/util:libmmi-util",
86  ]
87
88  external_deps = [
89    "c_utils:utils",
90    "eventhandler:libeventhandler",
91    "googletest:gtest_main",
92    "hilog:libhilog",
93    "image_framework:image_native",
94    "ipc:ipc_core",
95  ]
96}
97
98group("inject_event") {
99  testonly = true
100  deps = [ ":InjectEventTest" ]
101}
102