--- a/cmake/Findngspice.cmake
+++ b/cmake/Findngspice.cmake
@@ -102,7 +102,7 @@
     endif()
 endif()
 
-if( WIN32 AND MSYS )
+if( MINGW )
     # NGSPICE_LIBRARY points to libngspice.dll.a on Windows,
     # but the goal is to find out the DLL name.
     # Note: libngspice-0.dll or libngspice-1.dll must be in a executable path
