--- a/build/cmake/wxWidgetsConfig.cmake.in
+++ b/build/cmake/wxWidgetsConfig.cmake.in
@@ -15,10 +15,8 @@
 if(WIN32 AND NOT CYGWIN AND NOT MSYS)
     if(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
         set(wxCOMPILER_PREFIX "vc")
-    elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
+    elseif(MINGW)
         set(wxCOMPILER_PREFIX "gcc")
-    elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
-        set(wxCOMPILER_PREFIX "clang")
     endif()
 
     set(wxPLATFORM_ARCH)
--- a/build/cmake/init.cmake
+++ b/build/cmake/init.cmake
@@ -156,10 +156,8 @@
     # TODO: include compiler version in wxCOMPILER_PREFIX for official builds
     if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
         set(wxCOMPILER_PREFIX "vc")
-    elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+    elseif(MINGW)
         set(wxCOMPILER_PREFIX "gcc")
-    elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-        set(wxCOMPILER_PREFIX "clang")
     else()
         message(FATAL_ERROR "Unknown WIN32 compiler type")
     endif()
