diff --git a/CMakeLists.txt b/CMakeLists.txt
index ff9adc66d..d427ad059 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_policy(SET CMP0091 NEW)
 
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 
-include(cmake/variables.cmake)
+include(cmake/validate_special_target.cmake)
 include(cmake/version.cmake)
 desktop_app_parse_version(Telegram/build/version)
 
@@ -22,6 +22,7 @@ project(Telegram
 )
 set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT Telegram)
 
+include(cmake/variables.cmake)
 include(cmake/nice_target_sources.cmake)
 include(cmake/target_link_static_libraries.cmake)
 include(cmake/target_link_frameworks.cmake)
diff --git a/Telegram/configure.py b/Telegram/configure.py
index f54118584..61f88e93d 100644
--- a/Telegram/configure.py
+++ b/Telegram/configure.py
@@ -52,8 +52,7 @@ if officialTarget != '':
             elif apiHashMatch:
                 arguments.append('-DTDESKTOP_API_HASH=' + apiHashMatch.group(1))
     finish(run_cmake.run(scriptName, arguments))
-
-if 'linux' in sys.platform:
+elif 'linux' in sys.platform:
     debugCode = run_cmake.run(scriptName, arguments, "Debug")
     finish(debugCode if debugCode else run_cmake.run(scriptName, arguments, "Release"))
 else:
diff --git a/cmake b/cmake
index b087501d6..7081bc283 160000
--- a/cmake
+++ b/cmake
@@ -1 +1 @@
-Subproject commit b087501d66ea13395acd91397b3ab6a3a77c41b8
+Subproject commit 7081bc283b988361ae8be2c37e09e0d97c40b7db