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