summaryrefslogtreecommitdiffstats
path: root/fortran/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2011-01-05 15:04:35 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2011-01-05 15:04:35 (GMT)
commit4b3bdd519c02476e98d484f4af873e577fc25604 (patch)
treed550f8327609109b8a4754859389cb7b669048bb /fortran/src
parent865cc514351c7088e5b5b7dfcbedb7c58e147c1b (diff)
downloadhdf5-4b3bdd519c02476e98d484f4af873e577fc25604.zip
hdf5-4b3bdd519c02476e98d484f4af873e577fc25604.tar.gz
hdf5-4b3bdd519c02476e98d484f4af873e577fc25604.tar.bz2
[svn-r19911] Change how LINK_FLAGS for fortran are appended on Windows - correct for just shared libs
bring r19910 from trunk
Diffstat (limited to 'fortran/src')
-rw-r--r--fortran/src/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 9da2af7..25101b6 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -184,19 +184,23 @@ ENDIF (H5_HAVE_PARALLEL)
# Add Main fortran library
#-----------------------------------------------------------------------------
ADD_LIBRARY (${HDF5_F90_LIB_TARGET} ${LIB_TYPE} ${f90_F_SRCS})
-TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_F90_LIB_TARGET} "/DLL /DEF:${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def")
+SET (SHARED_LINK_FLAGS "")
IF (WIN32 AND NOT CYGWIN)
IF (BUILD_SHARED_LIBS)
SET_PROPERTY (TARGET ${HDF5_F90_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
BUILD_HDF5_DLL
)
+ IF (MSVC)
+ SET (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def")
+ ENDIF (MSVC)
ENDIF (BUILD_SHARED_LIBS)
SET_PROPERTY (TARGET ${HDF5_F90_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
ENDIF (WIN32 AND NOT CYGWIN)
+TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_F90_LIB_TARGET} ${SHARED_LINK_FLAGS})
SET_TARGET_PROPERTIES (${HDF5_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
TARGET_LINK_LIBRARIES (${HDF5_F90_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET})
SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}")