--- a/modules/hdf/CMakeLists.txt
+++ b/modules/hdf/CMakeLists.txt
@@ -1,6 +1,6 @@
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
 
-if(WIN32)
+if(MSVC)
   # windows cmake internal lookups are broken for now
   # will lookup for headers and shared libs given HDF_DIR env
   find_path(HDF5_INCLUDE_DIRS hdf5.h HINTS "$ENV{HDF5_DIR}\\..\\include")
