diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2012-11-27 15:53:30 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2012-11-27 15:53:30 (GMT) |
commit | b3c12e8d5542de76415e1f296bef6f3dbda292d0 (patch) | |
tree | c86347a4f58593c010e7d7588014f5b040a3a41e /fortran/src/CMakeLists.txt | |
parent | 19a00efd982756f5b56d38c03b8db8b28f0ff5df (diff) | |
download | hdf5-b3c12e8d5542de76415e1f296bef6f3dbda292d0.zip hdf5-b3c12e8d5542de76415e1f296bef6f3dbda292d0.tar.gz hdf5-b3c12e8d5542de76415e1f296bef6f3dbda292d0.tar.bz2 |
[svn-r23057] HDFFV-8265: create .def file during configure
Tested: windows
Diffstat (limited to 'fortran/src/CMakeLists.txt')
-rw-r--r-- | fortran/src/CMakeLists.txt | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 25e14ba..7cde8df 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -2,6 +2,19 @@ cmake_minimum_required (VERSION 2.8.6) PROJECT (HDF5_F90_SRC C CXX Fortran) #----------------------------------------------------------------------------- +# configure def file for shared libs on windows +IF (WIN32 AND NOT CYGWIN) + IF (BUILD_SHARED_LIBS) + IF (MSVC) + IF (NOT H5_HAVE_PARALLEL) + SET (H5_NOPAREXP ";") + ENDIF (NOT H5_HAVE_PARALLEL) + CONFIGURE_FILE (${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def.in ${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def @ONLY) + ENDIF (MSVC) + ENDIF (BUILD_SHARED_LIBS) +ENDIF (WIN32 AND NOT CYGWIN) + +#----------------------------------------------------------------------------- # Setup the Fortran auto-detection utilities # H5test_kind(_SIZEOF).f90 used to generate H5fortran_detect.f90 # H5fortran_detect.f90 used to generate H5fort_type_defines.h @@ -208,11 +221,7 @@ IF (WIN32 AND NOT CYGWIN) BUILD_HDF5_DLL ) IF (MSVC) - IF (H5_HAVE_PARALLEL) - SET (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_SOURCE_DIR}/phdf5_fortrandll.def") - ELSE (H5_HAVE_PARALLEL) - SET (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def") - ENDIF (H5_HAVE_PARALLEL) + SET (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def") ENDIF (MSVC) ENDIF (BUILD_SHARED_LIBS) SET_PROPERTY (TARGET ${HDF5_F90_LIB_TARGET} |