From fe3d8ea2be8ba07cf632a4938b45d79132175565 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Wed, 30 Apr 2025 23:31:30 +0400 Subject: [PATCH] Don't check non-MSVC options with MSVC for tgcalls --- Telegram/cmake/lib_tgcalls.cmake | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Telegram/cmake/lib_tgcalls.cmake b/Telegram/cmake/lib_tgcalls.cmake index 44539b54b3..88800c9af6 100644 --- a/Telegram/cmake/lib_tgcalls.cmake +++ b/Telegram/cmake/lib_tgcalls.cmake @@ -225,8 +225,7 @@ PRIVATE RTC_ENABLE_VP9 ) -if (WIN32) -elseif (APPLE) +if (APPLE) target_compile_options(lib_tgcalls PRIVATE -fobjc-arc @@ -253,14 +252,16 @@ elseif (APPLE) ) endif() -target_compile_options_if_exists(lib_tgcalls -PRIVATE - -Wno-deprecated-volatile - -Wno-ambiguous-reversed-operator - -Wno-deprecated-declarations - -Wno-unqualified-std-cast-call - -Wno-unused-function -) +if (NOT MSVC) + target_compile_options_if_exists(lib_tgcalls + PRIVATE + -Wno-deprecated-volatile + -Wno-ambiguous-reversed-operator + -Wno-deprecated-declarations + -Wno-unqualified-std-cast-call + -Wno-unused-function + ) +endif() remove_target_sources(lib_tgcalls ${tgcalls_loc} platform/android/AndroidContext.cpp