mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-16 00:09:23 +00:00
66 lines
2.8 KiB
Python
66 lines
2.8 KiB
Python
load("//Config:buck_rule_macros.bzl", "static_library", "glob_map", "glob_sub_map", "merge_maps")
|
|
|
|
webrtc_include_prefix = "-I../../" if native.read_config("custom", "mode") == "project" else "-I"
|
|
|
|
static_library(
|
|
name = "TgVoipWebrtc",
|
|
srcs = glob([
|
|
"Sources/**/*.m",
|
|
"Sources/**/*.mm",
|
|
"tgcalls/tgcalls/**/*.cpp",
|
|
"tgcalls/tgcalls/**/*.mm",
|
|
"tgcalls/tgcalls/**/*.m",
|
|
], exclude = [
|
|
"tgcalls/tgcalls/legacy/**",
|
|
"tgcalls/tgcalls/platform/tdesktop/**",
|
|
"tgcalls/tgcalls/platform/windows/**",
|
|
"tgcalls/tgcalls/platform/android/**",
|
|
"tgcalls/tgcalls/platform/darwin/VideoCameraCapturerMac.*",
|
|
"tgcalls/tgcalls/platform/darwin/VideoMetalViewMac.*",
|
|
"tgcalls/tgcalls/platform/darwin/GLVideoViewMac.*",
|
|
"tgcalls/tgcalls/platform/darwin/ScreenCapturer.*",
|
|
]),
|
|
has_cpp = True,
|
|
headers = merge_maps([
|
|
glob_sub_map("PublicHeaders/", [
|
|
"PublicHeaders/**/*.h",
|
|
]),
|
|
glob_sub_map("tgcalls/tgcalls/", [
|
|
"tgcalls/tgcalls/**/*.h",
|
|
]),
|
|
]),
|
|
exported_headers = glob([
|
|
"PublicHeaders/**/*.h",
|
|
]),
|
|
compiler_flags = [
|
|
webrtc_include_prefix + "third-party/webrtc/webrtc-ios/src",
|
|
webrtc_include_prefix + "third-party/webrtc/webrtc-ios/src/third_party/abseil-cpp",
|
|
webrtc_include_prefix + "third-party/webrtc/webrtc-ios/src/sdk/objc",
|
|
webrtc_include_prefix + "third-party/webrtc/webrtc-ios/src/sdk/objc/base",
|
|
webrtc_include_prefix + "third-party/webrtc/webrtc-ios/src/sdk/objc/components/renderer/metal",
|
|
webrtc_include_prefix + "third-party/webrtc/webrtc-ios/src/sdk/objc/components/renderer/opengl",
|
|
webrtc_include_prefix + "third-party/webrtc/webrtc-ios/src/sdk/objc/components/video_codec",
|
|
webrtc_include_prefix + "third-party/webrtc/webrtc-ios/src/third_party/libyuv/include",
|
|
webrtc_include_prefix + "third-party/submodules/TgVoipWebrtc/PublicHeaders",
|
|
"-DWEBRTC_IOS",
|
|
"-DWEBRTC_MAC",
|
|
"-DWEBRTC_POSIX",
|
|
"-DRTC_ENABLE_VP9",
|
|
],
|
|
deps = [
|
|
"//submodules/MtProtoKit:MtProtoKit#shared",
|
|
"//submodules/Opus:opus",
|
|
"//submodules/openssl:openssl",
|
|
"//third-party/webrtc:webrtc_lib",
|
|
],
|
|
frameworks = [
|
|
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
|
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
|
"$SDKROOT/System/Library/Frameworks/AudioToolbox.framework",
|
|
"$SDKROOT/System/Library/Frameworks/VideoToolbox.framework",
|
|
"$SDKROOT/System/Library/Frameworks/CoreTelephony.framework",
|
|
"$SDKROOT/System/Library/Frameworks/CoreMedia.framework",
|
|
"$SDKROOT/System/Library/Frameworks/AVFoundation.framework",
|
|
],
|
|
)
|