From dbf673f67406c892df9564ca4a132b266e161fd6 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 12 Nov 2021 10:59:32 +0400 Subject: [PATCH] Build new tgcalls with C++20 on Windows. --- Telegram/SourceFiles/calls/calls_call.cpp | 6 ++++-- Telegram/ThirdParty/tgcalls | 2 +- Telegram/cmake/lib_tgcalls.cmake | 11 ++++++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/calls/calls_call.cpp b/Telegram/SourceFiles/calls/calls_call.cpp index d15c24b37..10df62e48 100644 --- a/Telegram/SourceFiles/calls/calls_call.cpp +++ b/Telegram/SourceFiles/calls/calls_call.cpp @@ -36,6 +36,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace tgcalls { class InstanceImpl; +class InstanceV2Impl; class InstanceImplLegacy; class InstanceImplReference; void SetLegacyGlobalServerConfig(const std::string &serverConfig); @@ -50,8 +51,9 @@ constexpr auto kSha256Size = 32; constexpr auto kAuthKeySize = 256; const auto kDefaultVersion = "2.4.4"_q; -const auto RegisterTag = tgcalls::Register(); -const auto RegisterTagLegacy = tgcalls::Register(); +const auto Register = tgcalls::Register(); +const auto RegisterV2 = tgcalls::Register(); +const auto RegisterLegacy = tgcalls::Register(); void AppendEndpoint( std::vector &list, diff --git a/Telegram/ThirdParty/tgcalls b/Telegram/ThirdParty/tgcalls index f76a9290f..f340af67a 160000 --- a/Telegram/ThirdParty/tgcalls +++ b/Telegram/ThirdParty/tgcalls @@ -1 +1 @@ -Subproject commit f76a9290fa502a8df473dd872aedf9a553b089cc +Subproject commit f340af67a01c64c3d9e6ba087832717d57cbfb30 diff --git a/Telegram/cmake/lib_tgcalls.cmake b/Telegram/cmake/lib_tgcalls.cmake index 7d94d3d4b..2e93e901c 100644 --- a/Telegram/cmake/lib_tgcalls.cmake +++ b/Telegram/cmake/lib_tgcalls.cmake @@ -7,7 +7,7 @@ add_library(lib_tgcalls STATIC) if (WIN32) - init_target(lib_tgcalls cxx_std_17) # Small amount of patches required here. + init_target(lib_tgcalls) # Small amount of patches required here. elseif (LINUX) init_target(lib_tgcalls) # All C++20 on Linux, because otherwise ODR violation. else() @@ -62,6 +62,15 @@ PRIVATE VideoCaptureInterfaceImpl.h VideoCapturerInterface.h + v2/InstanceV2Impl.cpp + v2/InstanceV2Impl.h + v2/NativeNetworkingImpl.cpp + v2/NativeNetworkingImpl.h + v2/Signaling.cpp + v2/Signaling.h + v2/SignalingEncryption.cpp + v2/SignalingEncryption.h + # Desktop capturer desktop_capturer/DesktopCaptureSource.h desktop_capturer/DesktopCaptureSource.cpp