diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2015-03-30 17:32:55 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2015-03-30 17:32:55 (GMT) |
commit | c923afdf50173d8fd80d252375eb01f3eb8fdf8e (patch) | |
tree | ed93d0ead945d4f5c5115e76134639ba7ba11865 /hl/fortran/src | |
parent | 6a664ffa5aba85eb2d35526fa9d41a5b69f7f21d (diff) | |
download | hdf5-c923afdf50173d8fd80d252375eb01f3eb8fdf8e.zip hdf5-c923afdf50173d8fd80d252375eb01f3eb8fdf8e.tar.gz hdf5-c923afdf50173d8fd80d252375eb01f3eb8fdf8e.tar.bz2 |
[svn-r26654] Bring trunk CMake changes to branch.
Tested: local linux
Diffstat (limited to 'hl/fortran/src')
-rw-r--r-- | hl/fortran/src/CMakeLists.txt | 48 |
1 files changed, 22 insertions, 26 deletions
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index c9d3c32..6e6e44a 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -8,7 +8,6 @@ INCLUDE_DIRECTORIES ( ${HDF5_HL_SRC_DIR}/src ${HDF5_F90_SRC_DIR}/src ${HDF5_F90_BINARY_DIR} - ${CMAKE_Fortran_MODULE_DIRECTORY} ) #----------------------------------------------------------------------------- @@ -53,8 +52,8 @@ if (BUILD_SHARED_LIBS) if (WIN32) set_property (TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS - BUILD_HDF5_DLL - ) + BUILD_HDF5_HL_DLL + ) if (MSVC) set (SHARED_LINK_FLAGS "/DLL") endif (MSVC) @@ -67,7 +66,6 @@ if (WIN32) ) endif (WIN32) TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} " " ${SHARED_LINK_FLAGS}) -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}) @@ -75,37 +73,35 @@ set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES FOLDER libraries/hl/fortran LINKER_LANGUAGE Fortran INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} ) #----------------------------------------------------------------------------- # Add file(s) to CMake Install #----------------------------------------------------------------------------- + if (WIN32) - install ( - FILES - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5ds.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5tb.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5lt.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5im.mod - DESTINATION - ${HDF5_INSTALL_INCLUDE_DIR} - COMPONENT - fortheaders - ) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}) else (WIN32) - install ( - FILES - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5ds.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5tb.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5lt.mod - ${CMAKE_Fortran_MODULE_DIRECTORY}/h5im.mod - DESTINATION - ${HDF5_INSTALL_INCLUDE_DIR} - COMPONENT - fortheaders - ) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}) endif (WIN32) +set (mod_files + ${MOD_BUILD_DIR}/h5ds.mod + ${MOD_BUILD_DIR}/h5tb.mod + ${MOD_BUILD_DIR}/h5lt.mod + ${MOD_BUILD_DIR}/h5im.mod +) + +install ( + FILES + ${mod_files} + DESTINATION + ${HDF5_INSTALL_INCLUDE_DIR} + COMPONENT + fortheaders +) + #----------------------------------------------------------------------------- # Add Target(s) to CMake Install for import into other projects #----------------------------------------------------------------------------- |