diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-05-07 21:05:14 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-05-07 21:05:14 (GMT) |
commit | 984ecb72c2fa62d233383b24047e04061754ae34 (patch) | |
tree | a0a1ce905153a08466dae1354e14d426c86b3849 /hl/fortran/src | |
parent | ed599421c5ef01347368d50b1b7dbed3b323c43f (diff) | |
parent | 8f82c9b8be875cd28e18402e920f8e162d8f8d38 (diff) | |
download | hdf5-984ecb72c2fa62d233383b24047e04061754ae34.zip hdf5-984ecb72c2fa62d233383b24047e04061754ae34.tar.gz hdf5-984ecb72c2fa62d233383b24047e04061754ae34.tar.bz2 |
[svn-r27038] Merge of r26393-27031 from the trunk.
Tested on 64-bit linux VM w/ C++ and Fortran 2003
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 f188a53..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} ) #----------------------------------------------------------------------------- @@ -26,7 +25,7 @@ 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) add_library (${HDF5_HL_F90_C_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS}) -TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} " " " ") +TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} ${LIB_TYPE} " " " ") 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}) @@ -66,8 +65,7 @@ if (WIN32) HDF5F90_WINDOWS ) endif (WIN32) -TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} " " ${SHARED_LINK_FLAGS}) -set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran) +TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} " " ${SHARED_LINK_FLAGS}) 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 #----------------------------------------------------------------------------- |