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") 17config("libmmi_virtual_device_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ "include" ] 20} 21 22config("virtual_device_public_config") { 23 include_dirs = [ "include" ] 24} 25 26ohos_source_set("libmmi-virtual-device") { 27 sources = libmmi_virtual_device_sources 28 stack_protector_ret = true 29 sanitize = { 30 cfi = true 31 cfi_cross_dso = true 32 debug = false 33 } 34 configs = [ ":libmmi_virtual_device_config" ] 35 36 part_name = "input" 37 subsystem_name = "multimodalinput" 38 external_deps = [ "c_utils:utils" ] 39} 40 41ohos_executable("vuinput") { 42 sources = [ "src/mmi_virtual_device_main.cpp" ] 43 stack_protector_ret = true 44 sanitize = { 45 cfi = true 46 cfi_cross_dso = true 47 debug = false 48 } 49 configs = [ ":virtual_device_public_config" ] 50 51 deps = [ 52 "${mmi_path}/patch/diff_libinput_mmi:libinput-third-mmi", 53 "${mmi_path}/tools/vuinput:libmmi-virtual-device", 54 ] 55 56 external_deps = [ "c_utils:utils" ] 57 install_enable = true 58 part_name = "input" 59 subsystem_name = "multimodalinput" 60} 61 62module_output_path = "multimodalinput/mmi_unit_out" 63ohos_unittest("ut-virtual-device-out") { 64 module_out_path = module_output_path 65 include_dirs = [ 66 "${mmi_path}/tools/vuinput/include", 67 "${mmi_path}/util/common", 68 "${mmi_path}/util/common/include", 69 "${mmi_path}/util/network", 70 "${mmi_path}/util/network/include", 71 "${mmi_path}/util/socket", 72 "${mmi_path}/util/socket/include", 73 "$root_out_dir/diff_libinput_mmi/export_include", 74 ] 75 76 sources = [ "test/virtual_device_test.cpp" ] 77 78 configs = [ 79 "${mmi_path}:coverage_flags", 80 ":virtual_device_public_config", 81 ] 82 83 deps = [ 84 "${mmi_path}/patch/diff_libinput_mmi:libinput-third-mmi", 85 "${mmi_path}/tools/vuinput:libmmi-virtual-device", 86 "${mmi_path}/util:libmmi-util", 87 "//third_party/googletest:gmock_main", 88 "//third_party/googletest:gtest_main", 89 ] 90 91 external_deps = [ 92 "c_utils:utils", 93 "hilog:libhilog", 94 ] 95} 96