Add support for installing Fortran modules
I am looking for an easy way to install a Fortran module associated with a target. I foresee two ways this could be implemented.
-
install(TARGETS TheTarget MODULE DESTINATION mod)
(I'll even take Fortran_MODULE to be consistent with naming elsewhere) so that it mimics the behavior of ARCHIVE, RUNTIME, LIBRARY, etc.) -
set_target_properties(TheTarget PROPERTIES INSTALL_Fortran_MODULE "${SofaOutputName}")
and then the *.mod file will automatically have the same install rules as other products with a simpleinstall(TARGETS TheTarget DESTINATION bin)
This seems it ties in well with the spirit of #19126 as well.