mirror of https://github.com/ecmwf/eccodes.git
GRIB-665: cmake build does not install Fortran module
This commit is contained in:
parent
cbc72098da
commit
e1d8893192
|
@ -48,17 +48,25 @@ if( EC_HAVE_FORTRAN )
|
|||
|
||||
install( FILES grib_api_f77.h DESTINATION ${INSTALL_INCLUDE_DIR} )
|
||||
|
||||
install( CODE "EXECUTE_PROCESS (COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_Fortran_MODULE_DIRECTORY}/${CMAKE_CFG_INTDIR} ${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR})" )
|
||||
# Install the generated .mod file
|
||||
# install( CODE "EXECUTE_PROCESS (COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_Fortran_MODULE_DIRECTORY}/${CMAKE_CFG_INTDIR} ${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR})" )
|
||||
install( FILES ${CMAKE_Fortran_MODULE_DIRECTORY}/${CMAKE_CFG_INTDIR}/grib_api.mod
|
||||
DESTINATION ${INSTALL_INCLUDE_DIR} )
|
||||
|
||||
# Install also as the eccodes module file
|
||||
install( FILES ${CMAKE_Fortran_MODULE_DIRECTORY}/${CMAKE_CFG_INTDIR}/grib_api.mod
|
||||
RENAME eccodes.mod
|
||||
DESTINATION ${INSTALL_INCLUDE_DIR} )
|
||||
|
||||
# After the installation, make the eccodes module file a symlink to the grib_api one
|
||||
install(CODE
|
||||
"
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}
|
||||
${CMAKE_COMMAND} -E create_symlink grib_api.mod eccodes.mod
|
||||
)
|
||||
"
|
||||
)
|
||||
#install(CODE
|
||||
# "
|
||||
# EXECUTE_PROCESS(
|
||||
# COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}
|
||||
# ${CMAKE_COMMAND} -E create_symlink grib_api.mod eccodes.mod
|
||||
# )
|
||||
# "
|
||||
#)
|
||||
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in New Issue