From 0bc342604ed4873bb9a24fd4205fec7d17eca953 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 9 Nov 2023 08:56:02 -0600 Subject: [PATCH] always define DLLDEF --- fortran/src/CMakeLists.txt | 2 ++ hl/fortran/src/CMakeLists.txt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index f8e25b5b392..b72e7f514c4 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -361,6 +361,8 @@ endif () if (BUILD_SHARED_LIBS) if(MSVC) set(DLLDEF ${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def) + else() + set(DLLDEF "") endif() add_library (${HDF5_F90_LIBSH_TARGET} SHARED ${DLLDEF} ${f90_F_SOURCES_SHARED}) target_include_directories (${HDF5_F90_LIBSH_TARGET} diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 363003e0660..38c742fd714 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -200,6 +200,8 @@ endif () if (BUILD_SHARED_LIBS) if(MSVC) set(DLLDEF ${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def) + else() + set(DLLDEF "") endif() add_library (${HDF5_HL_F90_LIBSH_TARGET} SHARED ${DLLDEF} ${HDF5_HL_F90_F_SOURCES_SHARED}) target_include_directories (${HDF5_HL_F90_LIBSH_TARGET}