--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -26,7 +26,7 @@
 endif()
 
 # Use different DLL filenames on Windows. It allows platform neutral adapters to load dynamicly the correct version.
-if(WIN32 AND BUILD_SHARED_LIBS)
+if(MSVC AND BUILD_SHARED_LIBS)
   if(CMAKE_SIZEOF_VOID_P EQUAL 8)
     if(CMAKE_CXX_COMPILER_ARCHITECTURE_ID MATCHES "ARM64")
       set_target_properties(charls PROPERTIES OUTPUT_NAME "charls-2-arm64")
