1# Copyright (c) 2021 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 14udp_sdk_path = rebase_path("../../../../sdk") 15import("$udp_sdk_path/transmission/trans_channel/udp/file/file_sdk.gni") 16import("$udp_sdk_path/transmission/trans_channel/udp/stream/stream_sdk.gni") 17import("../../../../dsoftbus.gni") 18 19dsoftbus_udp_sdk_path = "$dsoftbus_sdk_path/transmission/trans_channel/udp" 20if (dsoftbus_feature_trans_udp == true && 21 (dsoftbus_feature_dfile == true || dsoftbus_feature_vtp == true)) { 22 trans_udp_channel_sdk_src = 23 [ "$dsoftbus_udp_sdk_path/common/src/client_trans_udp_manager.c" ] 24} else { 25 trans_udp_channel_sdk_src = 26 [ "$dsoftbus_udp_sdk_path/common/src/client_trans_udp_virtual.c" ] 27} 28trans_udp_channel_sdk_inc = [ 29 "$dsoftbus_udp_sdk_path/common/include", 30 "$dsoftbus_udp_sdk_path/stream/include", 31] 32trans_udp_channel_sdk_inc += trans_dstream_inc + trans_file_sdk_inc 33trans_udp_channel_sdk_deps = [] 34 35if (defined(ohos_lite)) { 36 if (ohos_kernel_type == "liteos_m") { 37 if (dsoftbus_feature_trans_udp != true) { 38 trans_udp_channel_sdk_src += 39 [ "$dsoftbus_udp_sdk_path/file/src/client_trans_file_virtual.c" ] 40 trans_udp_channel_sdk_inc += [ "$dsoftbus_udp_sdk_path/file/include" ] 41 } 42 } else { 43 trans_udp_channel_sdk_src += trans_dstream_src + trans_file_sdk_src 44 trans_udp_channel_sdk_deps += trans_dstream_deps + trans_file_sdk_deps 45 } 46} else { 47 trans_udp_channel_sdk_src += trans_dstream_src + trans_file_sdk_src 48 trans_udp_channel_sdk_deps += trans_dstream_deps + trans_file_sdk_deps 49} 50