diff --git a/CMakeLists.txt b/CMakeLists.txt
index df9aa67b9..315d47654 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,6 +9,10 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.10)
     cmake_policy(SET CMP0071 NEW)
 endif()
 
+if (UNIX AND NOT APPLE)
+    set(LINUX 1)
+endif()
+
 ##================================================
 ## Configure packages
 ##================================================
diff --git a/Telegram/ThirdParty/libtgvoip/CMakeLists.txt b/Telegram/ThirdParty/libtgvoip/CMakeLists.txt
index 26df4d436..6785f23a0 100644
--- a/Telegram/ThirdParty/libtgvoip/CMakeLists.txt
+++ b/Telegram/ThirdParty/libtgvoip/CMakeLists.txt
@@ -1,5 +1,9 @@
 project(libtgvoip)
 
+if (UNIX AND NOT APPLE)
+    set(LINUX 1)
+endif()
+
 add_library(tgvoip STATIC
     BlockingQueue.cpp
     BufferInputStream.cpp