# Copyright (c) 2021-2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//build/test.gni") import("../../multimodalinput_mini.gni") config("libmmi_virtual_device_config") { visibility = [ ":*" ] include_dirs = [ "include" ] } config("virtual_device_public_config") { include_dirs = [ "include" ] } ohos_source_set("libmmi-virtual-device") { sources = libmmi_virtual_device_sources branch_protector_ret = "pac_ret" sanitize = { cfi = true cfi_cross_dso = true debug = false } configs = [ ":libmmi_virtual_device_config" ] public_configs = [ ":virtual_device_public_config" ] part_name = "input" subsystem_name = "multimodalinput" external_deps = [ "c_utils:utils" ] } ohos_executable("vuinput") { sources = [ "src/mmi_virtual_device_main.cpp" ] branch_protector_ret = "pac_ret" sanitize = { cfi = true cfi_cross_dso = true debug = false } configs = [ ":virtual_device_public_config" ] deps = [ "${mmi_path}/tools/vuinput:libmmi-virtual-device" ] external_deps = [ "c_utils:utils", "libinput:libinput-third-mmi", ] install_enable = true part_name = "input" subsystem_name = "multimodalinput" } module_output_path = "multimodalinput/mmi_unit_out" ohos_unittest("ut-virtual-device-out") { module_out_path = module_output_path include_dirs = [ "${mmi_path}/tools/vuinput/include", "${mmi_path}/util/common", "${mmi_path}/util/common/include", "${mmi_path}/util/network", "${mmi_path}/util/network/include", "${mmi_path}/util/socket", "${mmi_path}/util/socket/include", "$root_out_dir/diff_libinput_mmi/export_include", ] sources = [ "test/virtual_device_test.cpp" ] configs = [ "${mmi_path}:coverage_flags", ":virtual_device_public_config", ] deps = [ "${mmi_path}/tools/vuinput:libmmi-virtual-device", "${mmi_path}/util:libmmi-util", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] external_deps = [ "c_utils:utils", "hilog:libhilog", "libinput:libinput-third-mmi", ] }