diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-07-09 18:03:58 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-07-09 18:03:58 (GMT) |
commit | 07a52ecb2ffa1d8d32f06db23470833899db3deb (patch) | |
tree | 9907361e0bcf965328735951ebb622399c6fb107 /CMakeLists.txt | |
parent | 4b122440910911a51e8440d37db27960476d4d11 (diff) | |
download | hdf5-07a52ecb2ffa1d8d32f06db23470833899db3deb.zip hdf5-07a52ecb2ffa1d8d32f06db23470833899db3deb.tar.gz hdf5-07a52ecb2ffa1d8d32f06db23470833899db3deb.tar.bz2 |
HDFFV-11116 Add option for install location of Fortran MOD files
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b559446..ac291fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -995,6 +995,17 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for endif () endif () + #option (HDF5_INSTALL_MOD_FORTRAN "Copy FORTRAN mod files to include directory (NO SHARED STATIC)" "NO") + set (HDF5_INSTALL_MOD_FORTRAN "SHARED" CACHE STRING "Copy FORTRAN mod files to include directory (NO SHARED STATIC)") + set_property (CACHE HDF5_INSTALL_MOD_FORTRAN PROPERTY STRINGS NO SHARED STATIC) + if (NOT HDF5_INSTALL_MOD_FORTRAN MATCHES "NO") + if (NOT BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS) + set (HDF5_INSTALL_MOD_FORTRAN "STATIC") + elseif (BUILD_SHARED_LIBS AND NOT BUILD_STATIC_LIBS) + set (HDF5_INSTALL_MOD_FORTRAN "SHARED") + endif () + endif () + add_subdirectory (fortran) if (HDF5_BUILD_HL_LIB) if (EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran") |