1# Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development 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("//foundation/CastEngine/castengine_wifi_display/config.gni") 17 18module_out_path = "sharing/protocol" 19 20ohos_unittest("rtp_unit_test") { 21 module_out_path = module_out_path 22 23 include_dirs = [ 24 "$SHARING_ROOT_DIR/services", 25 "$SHARING_ROOT_DIR/frameworks/innerkitsimpl", 26 "$SHARING_ROOT_DIR/services/utils/native/base/include", 27 "$SHARING_ROOT_DIR/services/protocol", 28 "$SHARING_ROOT_DIR/services/protocol/frame/include", 29 "$SHARING_ROOT_DIR/services/protocol/rtcp/include", 30 "$SHARING_ROOT_DIR/services/protocol/rtp/include", 31 "$SHARING_ROOT_DIR/services/protocol/rtsp/include", 32 ] 33 34 sources = [ "rtp_unit_test.cpp" ] 35 36 cflags = [ 37 "-Wall", 38 "-fno-exceptions", 39 "-fno-common", 40 "-fstack-protector-strong", 41 "-Wshadow", 42 "-FPIC", 43 "-FS", 44 "-O2", 45 "-D_FORTIFY_SOURCE=2", 46 "-fvisibility=hidden", 47 "-Wformat=2", 48 "-Wdate-time", 49 "-Werror", 50 "-Wextra", 51 "-Wimplicit-fallthrough", 52 "-Wsign-compare", 53 "-Wno-unused-parameter", 54 "-Wno-deprecated-declarations", 55 "-Dprivate=public", 56 "-Dprotected=public", 57 ] 58 59 cflags_cc = cflags 60 cflags_cc += [ "-std=c++17" ] 61 62 deps = [ 63 "$SHARING_ROOT_DIR/services/common:sharing_common", 64 "$SHARING_ROOT_DIR/services/protocol/rtp:sharing_rtp", 65 "$SHARING_ROOT_DIR/services/protocol/rtsp:sharing_rtsp", 66 "//third_party/ffmpeg:libohosffmpeg", 67 "//third_party/googletest:gtest_main", 68 ] 69 70 external_deps = [ 71 "c_utils:utils", 72 "c_utils:utilsbase", 73 "graphic_surface:surface", 74 "hilog:libhilog", 75 "samgr:samgr_proxy", 76 ] 77} 78