summaryrefslogtreecommitdiffstats
path: root/hl
diff options
context:
space:
mode:
Diffstat (limited to 'hl')
-rw-r--r--hl/fortran/src/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index 77b73d2..fecfc15 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -51,13 +51,16 @@ SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT
H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} ${LIB_TYPE})
ADD_LIBRARY (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS})
-TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} "/DLL")
+SET (SHARED_LINK_FLAGS "")
IF (BUILD_SHARED_LIBS)
IF (WIN32 AND NOT CYGWIN)
SET_PROPERTY (TARGET ${HDF5_HL_F90_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
BUILD_HDF5_DLL
)
+ IF (MSVC)
+ SET (SHARED_LINK_FLAGS "/DLL")
+ ENDIF (MSVC)
ENDIF (WIN32 AND NOT CYGWIN)
ENDIF (BUILD_SHARED_LIBS)
IF (WIN32 AND NOT CYGWIN)
@@ -66,6 +69,7 @@ IF (WIN32 AND NOT CYGWIN)
HDF5F90_WINDOWS
)
ENDIF (WIN32 AND NOT CYGWIN)
+TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} ${SHARED_LINK_FLAGS})
SET_TARGET_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
TARGET_LINK_LIBRARIES (${HDF5_HL_F90_LIB_TARGET}
${HDF5_HL_F90_C_LIB_TARGET}