summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fortran/src/CMakeLists.txt11
-rw-r--r--hl/fortran/src/CMakeLists.txt2
2 files changed, 8 insertions, 5 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 3d1c127..cecbfb6 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -84,9 +84,6 @@ ADD_CUSTOM_COMMAND (
# f90CStub lib
#-----------------------------------------------------------------------------
SET (f90CStub_C_SRCS
- # generated files
- ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
-
# normal distribution
${HDF5_F90_SRC_SOURCE_DIR}/H5f90kit.c
${HDF5_F90_SRC_SOURCE_DIR}/H5_f.c
@@ -114,11 +111,17 @@ ENDIF (H5_HAVE_PARALLEL)
SET_SOURCE_FILES_PROPERTIES (${f90CStub_C_SRCS} PROPERTIES LANGUAGE C)
-ADD_LIBRARY (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} ${f90CStub_C_SRCS})
+SET (f90CStub_C_HDRS
+ # generated files
+ ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
+)
+
+ADD_LIBRARY (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} ${f90CStub_C_SRCS} ${f90CStub_C_HDRS})
TARGET_LINK_LIBRARIES (${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS})
SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_NAME} ${LIB_TYPE})
SET_TARGET_PROPERTIES (${HDF5_F90_C_LIB_TARGET} PROPERTIES FOLDER libraries/fortran)
+SET_TARGET_PROPERTIES (${HDF5_F90_C_LIB_TARGET} PROPERTIES LINKER_LANGUAGE C)
#-----------------------------------------------------------------------------
# Fortran 2003 standard
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index 916e9e1..f01c7f8 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -24,13 +24,13 @@ SET (HDF5_HL_F90_C_SRCS
SET_SOURCE_FILES_PROPERTIES (${HDF5_HL_F90_C_SRCS} PROPERTIES LANGUAGE C)
SET (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h)
-SET_SOURCE_FILES_PROPERTIES (${HDF5_HL_F90_HEADERS} PROPERTIES LANGUAGE C)
ADD_LIBRARY (${HDF5_HL_F90_C_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS})
TARGET_LINK_LIBRARIES (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET})
SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} ${LIB_TYPE})
SET_TARGET_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES FOLDER libraries/hl/fortran)
+SET_TARGET_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES LINKER_LANGUAGE C)
#-----------------------------------------------------------------------------
# Fortran Modules