--- a/cmake/AddRCInfo.cmake
+++ b/cmake/AddRCInfo.cmake
@@ -58,11 +58,10 @@
 endif(build_release)

 # if mingw env add -c 65001 to CMAKE_RC_FLAGS
-if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+if(MINGW)
   set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} -c 65001")
-endif()
-# if clang build, use llvm-rc to compile resource file
-if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+  # if clang-cl build, use llvm-rc to compile resource file
   set(CMAKE_RC_COMPILER "llvm-rc")
   set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} -finput-charset=UTF-8")
 endif()
