From 46550381a4073938bd4ba2cfcbf55fd469983198 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 13 Jul 2020 18:04:02 +0400 Subject: [PATCH] Fix build on macOS. --- Telegram/SourceFiles/calls/calls_call.cpp | 2 +- Telegram/ThirdParty/tgcalls | 2 +- Telegram/cmake/lib_tgcalls.cmake | 34 +++++++++++++++++------ Telegram/lib_webrtc | 2 +- cmake | 2 +- 5 files changed, 29 insertions(+), 13 deletions(-) diff --git a/Telegram/SourceFiles/calls/calls_call.cpp b/Telegram/SourceFiles/calls/calls_call.cpp index 9a9070ee3..1615bb4b2 100644 --- a/Telegram/SourceFiles/calls/calls_call.cpp +++ b/Telegram/SourceFiles/calls/calls_call.cpp @@ -675,7 +675,7 @@ void Call::createAndStartController(const MTPDphoneCall &call) { #else // Q_OS_WIN const auto callLogUtf = QFile::encodeName(callLogNative); descriptor.config.logPath.resize(callLogUtf.size()); - ranges::copy(callLogUtf, config.logPath.begin()); + ranges::copy(callLogUtf, descriptor.config.logPath.begin()); #endif // Q_OS_WIN QFile(callLogPath).remove(); QDir().mkpath(callLogFolder); diff --git a/Telegram/ThirdParty/tgcalls b/Telegram/ThirdParty/tgcalls index 77f3411be..dc2d21160 160000 --- a/Telegram/ThirdParty/tgcalls +++ b/Telegram/ThirdParty/tgcalls @@ -1 +1 @@ -Subproject commit 77f3411be90234a90cf0479d17e26bbad7106de3 +Subproject commit dc2d21160e5ff64ecd13f12afe7b34ad2cb1b0a1 diff --git a/Telegram/cmake/lib_tgcalls.cmake b/Telegram/cmake/lib_tgcalls.cmake index 6518dc82e..e45394a35 100644 --- a/Telegram/cmake/lib_tgcalls.cmake +++ b/Telegram/cmake/lib_tgcalls.cmake @@ -35,12 +35,12 @@ PRIVATE VideoCapturerInterface.h platform/PlatformInterface.h + platform/tdesktop/VideoCapturerInterfaceImpl.cpp + platform/tdesktop/VideoCapturerInterfaceImpl.h # Windows platform/windows/WindowsInterface.cpp platform/windows/WindowsInterface.h - platform/windows/VideoCapturerInterfaceImpl.cpp - platform/windows/VideoCapturerInterfaceImpl.h # iOS / macOS platform/darwin/DarwinInterface.h @@ -53,22 +53,38 @@ PRIVATE platform/darwin/TGRTCVideoDecoderH265.mm platform/darwin/TGRTCVideoEncoderH265.h platform/darwin/TGRTCVideoEncoderH265.mm - platform/darwin/VideoCameraCapturer.h - platform/darwin/VideoCameraCapturer.mm - platform/darwin/VideoCapturerInterfaceImpl.h - platform/darwin/VideoCapturerInterfaceImpl.mm - platform/darwin/VideoMetalView.h - platform/darwin/VideoMetalView.mm + # platform/darwin/VideoCameraCapturer.h + # platform/darwin/VideoCameraCapturer.mm + # platform/darwin/VideoCapturerInterfaceImpl.h + # platform/darwin/VideoCapturerInterfaceImpl.mm + # platform/darwin/VideoMetalView.h + # platform/darwin/VideoMetalView.mm # Linux # POSIX ) +target_compile_definitions(lib_tgcalls +PRIVATE + WEBRTC_APP_TDESKTOP + RTC_ENABLE_VP9 +) + if (WIN32) target_compile_definitions(lib_tgcalls PRIVATE - TARGET_OS_WIN + WEBRTC_WIN + ) +elseif (APPLE) + target_compile_definitions(lib_tgcalls + PRIVATE + WEBRTC_MAC + ) +else() + target_compile_definitions(lib_tgcalls + PRIVATE + WEBRTC_LINUX ) endif() diff --git a/Telegram/lib_webrtc b/Telegram/lib_webrtc index 078f6bf15..6c349a974 160000 --- a/Telegram/lib_webrtc +++ b/Telegram/lib_webrtc @@ -1 +1 @@ -Subproject commit 078f6bf15d60c23f9907d91398bfd6bf201638be +Subproject commit 6c349a97466d3f38b7e7a4cb85a18a0b4e290b92 diff --git a/cmake b/cmake index 8414d2aa3..bff30ad53 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 8414d2aa3a51511076de41e65fc10f4821cc67b3 +Subproject commit bff30ad53b5097718b6151bd15ab4ad3a0ddf807