# 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("//foundation/multimodalinput/input/multimodalinput_mini.gni") module_output_path = "multimodalinput/unit_out" config("libmmi_util_public_config") { include_dirs = [ "common/include", "network/include", "socket/include", "//foundation/multimodalinput/input/interfaces/native/innerkits/common/include", "//foundation/multimodalinput/input/interfaces/native/innerkits/event/include", ] defines = [] if (input_feature_input_cooperation) { defines += [ "OHOS_BUILD_ENABLE_COOPERATE" ] } } ohos_shared_library("libmmi-util") { sources = [ "common/src/input_event_data_transformation.cpp", "common/src/klog.cpp", "common/src/util.cpp", "common/src/util_napi.cpp", "common/src/util_napi_error.cpp", "common/src/uuid.cpp", "network/src/circle_stream_buffer.cpp", "network/src/net_packet.cpp", "network/src/stream_buffer.cpp", "socket/src/uds_client.cpp", "socket/src/uds_session.cpp", "socket/src/uds_socket.cpp", ] configs = [ "//foundation/multimodalinput/input:multimodalinput_mmi_public_config", ":libmmi_util_public_config", ] public_deps = [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", "//commonlibrary/c_utils/base:utils", "//foundation/arkui/napi:ace_napi", "//foundation/multimodalinput/input/frameworks/proxy:libmmi-common", ] part_name = "input" subsystem_name = "multimodalinput" } ohos_unittest("ut-mmi-util-out") { module_out_path = module_output_path include_dirs = [ "//commonlibrary/c_utils/base/include", "//third_party/googletest/googletest/include", "//commonlibrary/c_utils/base/include", "${mmi_path}/frameworks/proxy/event_handler", "${mmi_path}/frameworks/proxy/event_handler/include", "${mmi_path}/frameworks/proxy/module_loader", "${mmi_path}/frameworks/proxy/module_loader/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", "${mmi_path}/frameworks/proxy/event_handle", "${mmi_path}/frameworks/proxy/event_handle/include", "${mmi_path}/frameworks/proxy/module_loader", "${mmi_path}/frameworks/proxy/module_loader/include", "${mmi_path}/interfaces/native/innerkits/common/include", "${mmi_path}/interfaces/native/innerkits/proxy/include", "${mmi_path}/interfaces/native/innerkits/event/include", "$root_out_dir/diff_libinput_mmi/export_include", ] defines = [] if (input_feature_input_cooperation) { defines += [ "OHOS_BUILD_ENABLE_COOPERATE" ] } sources = [ "common/test/util_test.cpp", "network/test/net_packet_test.cpp", "socket/test/stream_buffer_test.cpp", "socket/test/uds_client_test.cpp", "socket/test/uds_session_test.cpp", "socket/test/uds_socket_test.cpp", ] deps = [ "${mmi_path}/frameworks/proxy:libmmi-client", "${mmi_path}/util:libmmi-util", "//third_party/googletest:gmock_main", "//third_party/googletest:gtest_main", ] external_deps = [ "hiviewdfx_hilog_native:libhilog" ] }