--- a/config/HDF5Macros.cmake
+++ b/config/HDF5Macros.cmake
@@ -33,13 +33,13 @@
     set (PACKAGE_SOVERSION ${HDF5_${libpackage}_PACKAGE_SOVERSION})
     set (PACKAGE_COMPATIBILITY ${H5_${libpackage}_SOVERS_INTERFACE}.0.0)
     set (PACKAGE_CURRENT ${H5_${libpackage}_SOVERS_INTERFACE}.${H5_${libpackage}_SOVERS_MINOR}.0)
-    if (WIN32)
+    if (MSVC)
       set (LIBHDF_VERSION ${HDF5_PACKAGE_VERSION_MAJOR})
     else ()
       set (LIBHDF_VERSION ${HDF5_${libpackage}_PACKAGE_SOVERSION_MAJOR})
     endif ()
     set_target_properties (${libtarget} PROPERTIES VERSION ${PACKAGE_SOVERSION})
-    if (WIN32)
+    if (MSVC)
         set (${LIB_OUT_NAME} "${LIB_OUT_NAME}-${LIBHDF_VERSION}")
     else ()
         set_target_properties (${libtarget} PROPERTIES SOVERSION ${LIBHDF_VERSION})
--- a/config/HDFMacros.cmake
+++ b/config/HDFMacros.cmake
@@ -215,7 +215,7 @@
   )
 
   if (${libtype} MATCHES "STATIC")
-    if (WIN32)
+    if (MSVC)
       set_target_properties (${libtarget} PROPERTIES
           COMPILE_PDB_NAME_DEBUG          ${LIB_DEBUG_NAME}
           COMPILE_PDB_NAME_DEVELOPER      ${LIB_DEBUG_NAME}
