1# Copyright (c) 2021-2023 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("//test/xts/hats/build.gni") 17import("//test/xts/tools/build/suite.gni") 18 19module_output_path = "hats/codec" 20ohos_moduletest_suite("HatsHdfOmxCodecTest") { 21 module_out_path = module_output_path 22 configs = [ ":hdf_codec_omx" ] 23 sources = [ 24 "codec_hdi_manager_test.cpp", 25 "codec_hdi_omx_test.cpp", 26 ] 27 28 deps = [ "//third_party/googletest:gtest_main" ] 29 30 if (is_standard_system) { 31 external_deps = [ 32 "c_utils:utils", 33 "drivers_interface_display:display_buffer_idl_headers", 34 "drivers_interface_display:display_composer_idl_headers", 35 "drivers_interface_display:libdisplay_buffer_hdi_impl", 36 "drivers_interface_display:libdisplay_composer_hdi_impl", 37 "drivers_peripheral_codec:libcodec_hdi_omx_client", 38 "graphic_surface:buffer_handle", 39 "hdf_core:libhdf_host", 40 "hdf_core:libhdf_ipc_adapter", 41 "hdf_core:libhdf_utils", 42 "hdf_core:libhdi", 43 "hilog:libhilog", 44 "ipc:ipc_single", 45 ] 46 } else { 47 external_deps = [ "hilog:libhilog" ] 48 } 49 50 defines = [] 51 if (hats_rich) { 52 defines += [ "SUPPORT_OMX" ] 53 } 54 subsystem_name = "xts" 55 part_name = "hats" 56} 57 58config("hdf_codec_omx") { 59 include_dirs = [ "//third_party/openmax/api/1.1.2" ] 60 cflags = [ 61 "-Wall", 62 "-Wextra", 63 "-Werror", 64 "-fsigned-char", 65 "-fno-common", 66 "-fno-strict-aliasing", 67 ] 68 if (hats_rich == false) { 69 cflags += [ "-DSUPPORT_OMX" ] 70 } 71} 72