summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt6
-rw-r--r--hl/CMakeLists.txt5
-rw-r--r--hl/fortran/src/CMakeLists.txt6
3 files changed, 8 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b855419..0e44caa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -517,6 +517,12 @@ IF (HDF5_BUILD_FORTRAN)
IF(EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran")
ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/fortran ${PROJECT_BINARY_DIR}/fortran)
ENDIF(EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran")
+ IF (HDF5_BUILD_HL_LIB)
+ IF(EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran")
+ #-- Build the High Level Fortran source codes
+ ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/hl/fortran ${HDF5_BINARY_DIR}/hl/fortran)
+ ENDIF(EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran")
+ ENDIF (HDF5_BUILD_HL_LIB)
ELSE (HDF5_BUILD_FORTRAN)
SET (H5_FC_FUNC "H5_FC_FUNC(name,NAME) name ## _")
SET (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) name ## _")
diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt
index bc7c652..2871734 100644
--- a/hl/CMakeLists.txt
+++ b/hl/CMakeLists.txt
@@ -32,11 +32,6 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED)
ENDIF (BUILD_TESTING)
ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
-#-- Build the High Level Fortran source codes
-IF (HDF5_BUILD_FORTRAN)
- ADD_SUBDIRECTORY (fortran)
-ENDIF (HDF5_BUILD_FORTRAN)
-
IF (HDF5_BUILD_CPP_LIB)
ADD_SUBDIRECTORY (${HDF5_HL_SOURCE_DIR}/c++ ${HDF5_HL_BINARY_DIR}/c++)
ENDIF (HDF5_BUILD_CPP_LIB)
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index 71302f3..07fcb30 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -71,15 +71,13 @@ IF (WIN32)
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
- SET_TARGET_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
ENDIF (WIN32)
-SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT
- "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIB_TARGET}"
-)
+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}
${HDF5_F90_LIB_TARGET}
)
+SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_LIB_NAME} ${LIB_TYPE})
ADD_DEPENDENCIES (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_C_LIB_TARGET})