diff options
-rw-r--r-- | CMakeLists.txt | 13 | ||||
-rw-r--r-- | fortran/src/CMakeLists.txt | 25 |
2 files changed, 30 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2efdfbe..30f9ece 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -569,14 +569,6 @@ INSTALL ( HDF5-config.cmake ) -# The install rule below copies compiled module files to the install location -# using a "code" rule. The code string should not be broken up, it must be on one line -IF (HDF5_BUILD_FORTRAN) - INSTALL ( CODE - "EXECUTE_PROCESS (COMMAND \"${CMAKE_COMMAND}\" -E copy_directory \"${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}\" \"${CMAKE_INSTALL_PREFIX}/fortran\")" - ) -ENDIF (HDF5_BUILD_FORTRAN) - #----------------------------------------------------------------------------- # Export all exported targets to the build tree for use by parent project #----------------------------------------------------------------------------- @@ -628,6 +620,11 @@ IF (HDF5_BUILD_FORTRAN) DEPENDS libraries GROUP Runtime ) + CPACK_ADD_COMPONENT (fortheaders + DISPLAY_NAME "HDF5 Fortran Headers" + DEPENDS fortlibraries + GROUP Development + ) ENDIF (HDF5_BUILD_FORTRAN) IF (HDF5_BUILD_CPP_LIB) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 6c5efb2..e351a6f 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -213,6 +213,31 @@ SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} ${LIB_TYPE}) #----------------------------------------------------------------------------- +# Add file(s) to CMake Install +#----------------------------------------------------------------------------- +INSTALL ( + FILES + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h + ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h + ${HDF5_F90_BINARY_DIR}/H5fortran_types.f90 + DESTINATION + include/fortran + COMPONENT + fortheaders +) + +INSTALL ( + DIRECTORY + ${CMAKE_Fortran_MODULE_DIRECTORY}/${BUILD_TYPE}/ + DESTINATION + include/fortran + COMPONENT + fortheaders +) + +#----------------------------------------------------------------------------- # Add Target(s) to CMake Install for import into other projects #----------------------------------------------------------------------------- IF (HDF5_EXPORTED_TARGETS) |