diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 1b23c94a976..855310879ef 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -406,7 +406,7 @@ if (BUILD_STATIC_LIBS) endif () if (BUILD_SHARED_LIBS) - if(WIN32) + if(MSVC) set(DLLDEF ${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def) else() set(DLLDEF "") diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index f225eb8f3b4..a9361ad5029 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -193,7 +193,7 @@ if (BUILD_STATIC_LIBS) add_dependencies(${HDF5_HL_F90_LIB_TARGET} H5HLgen) endif () if (BUILD_SHARED_LIBS) - if(WIN32) + if(MSVC) set(DLLDEF ${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def) else() set(DLLDEF "")