Skip to content

Commit

Permalink
Fix the Fortran include dir in install config files (#3454)
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF authored Sep 2, 2023
1 parent 68c4815 commit 9c85c6e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions config/cmake/hdf5-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ set (${HDF5_PACKAGE_NAME}_ARCHITECTURE "@CMAKE_GENERATOR_ARCHITECTURE@")
set (${HDF5_PACKAGE_NAME}_TOOLSET "@CMAKE_GENERATOR_TOOLSET@")
set (${HDF5_PACKAGE_NAME}_DEFAULT_API_VERSION "@DEFAULT_API_VERSION@")
set (${HDF5_PACKAGE_NAME}_PARALLEL_FILTERED_WRITES @PARALLEL_FILTERED_WRITES@)
set (${HDF5_PACKAGE_NAME}_INSTALL_MOD_FORTRAN "@HDF5_INSTALL_MOD_FORTRAN@")

#-----------------------------------------------------------------------------
# Dependencies
Expand Down Expand Up @@ -150,14 +151,14 @@ foreach (comp IN LISTS ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS)
list (REMOVE_ITEM ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS ${comp})
set (${HDF5_PACKAGE_NAME}_LIB_TYPE ${${HDF5_PACKAGE_NAME}_LIB_TYPE} ${comp})

if (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN)
if (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN AND ${HDF5_PACKAGE_NAME}_INSTALL_MOD_FORTRAN STREQUAL "SHARED")
set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR_FORTRAN "@PACKAGE_INCLUDE_INSTALL_DIR@/shared")
endif ()
elseif (comp STREQUAL "static")
list (REMOVE_ITEM ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS ${comp})
set (${HDF5_PACKAGE_NAME}_LIB_TYPE ${${HDF5_PACKAGE_NAME}_LIB_TYPE} ${comp})

if (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN)
if (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN AND ${HDF5_PACKAGE_NAME}_INSTALL_MOD_FORTRAN STREQUAL "STATIC")
set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR_FORTRAN "@PACKAGE_INCLUDE_INSTALL_DIR@/static")
endif ()
endif ()
Expand Down

0 comments on commit 9c85c6e

Please sign in to comment.