From dad11a17dd784dcfe7b3f80be087ab2fddd68a06 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 12 Nov 2021 12:20:28 +0400 Subject: [PATCH] Build tg_owt / tgcalls / tgvoip with C++20. --- Telegram/ThirdParty/tgcalls | 2 +- Telegram/build/prepare/prepare.py | 2 +- Telegram/cmake/lib_tgcalls.cmake | 18 ++---------------- Telegram/cmake/lib_tgvoip.cmake | 9 +-------- 4 files changed, 5 insertions(+), 26 deletions(-) diff --git a/Telegram/ThirdParty/tgcalls b/Telegram/ThirdParty/tgcalls index f340af67a0..b5906f03f3 160000 --- a/Telegram/ThirdParty/tgcalls +++ b/Telegram/ThirdParty/tgcalls @@ -1 +1 @@ -Subproject commit f340af67a01c64c3d9e6ba087832717d57cbfb30 +Subproject commit b5906f03f388252d50fc008dcae549f56c2239f4 diff --git a/Telegram/build/prepare/prepare.py b/Telegram/build/prepare/prepare.py index 77abe924e7..37c33cc7e7 100644 --- a/Telegram/build/prepare/prepare.py +++ b/Telegram/build/prepare/prepare.py @@ -1154,7 +1154,7 @@ mac: stage('tg_owt', """ git clone https://github.com/desktop-app/tg_owt.git cd tg_owt - git checkout d578c760dc + git checkout ffbdaa616e git submodule init git submodule update src/third_party/libvpx/source/libvpx src/third_party/libyuv win: diff --git a/Telegram/cmake/lib_tgcalls.cmake b/Telegram/cmake/lib_tgcalls.cmake index 2e93e901c6..91dbc4ca09 100644 --- a/Telegram/cmake/lib_tgcalls.cmake +++ b/Telegram/cmake/lib_tgcalls.cmake @@ -5,14 +5,7 @@ # https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL add_library(lib_tgcalls STATIC) - -if (WIN32) - 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() - init_target(lib_tgcalls cxx_std_14) # Can't use std::optional::value on macOS. -endif() +init_target(lib_tgcalls) # Can't use std::optional::value on macOS. add_library(tdesktop::lib_tgcalls ALIAS lib_tgcalls) @@ -250,14 +243,7 @@ PRIVATE ) add_library(lib_tgcalls_legacy STATIC) - -if (WIN32) - init_target(lib_tgcalls_legacy cxx_std_17) # Small amount of patches required here. -elseif (LINUX) - init_target(lib_tgcalls_legacy) # All C++20 on Linux, because otherwise ODR violation. -else() - init_target(lib_tgcalls_legacy cxx_std_14) # Can't use std::optional::value on macOS. -endif() +init_target(lib_tgcalls_legacy) add_library(tdesktop::lib_tgcalls_legacy ALIAS lib_tgcalls_legacy) diff --git a/Telegram/cmake/lib_tgvoip.cmake b/Telegram/cmake/lib_tgvoip.cmake index f332b18074..68a64ba607 100644 --- a/Telegram/cmake/lib_tgvoip.cmake +++ b/Telegram/cmake/lib_tgvoip.cmake @@ -18,14 +18,7 @@ endif() if (NOT TGVOIP_FOUND) add_library(lib_tgvoip_bundled STATIC) - - if (WIN32) - init_target(lib_tgvoip_bundled cxx_std_17) # Small amount of patches required here. - elseif (LINUX) - init_target(lib_tgvoip_bundled) # All C++20 on Linux, because otherwise ODR violation. - else() - init_target(lib_tgvoip_bundled cxx_std_14) # Can't use std::optional::value on macOS. - endif() + init_target(lib_tgvoip_bundled) option(LIBTGVOIP_DISABLE_ALSA "Disable libtgvoip's ALSA backend (Linux only)." OFF) option(LIBTGVOIP_DISABLE_PULSEAUDIO "Disable libtgvoip's PulseAudio backend (Linux only)." OFF)