--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -118,7 +118,7 @@
 
 add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00)
 add_subdirectory(src)
-if (NOT ANDROID)
+if (NOT MINGW)
     add_subdirectory(templates)
 endif()
 
