I tried to use HDF5 with Fortran via cmake, but It looks like there is a problem with include directory
find_package( HDF5 REQUIRED COMPONENTS Fortran )
target_link_libraries( main ${HDF5_LIBRARIES} )
target_include_directories( main PRIVATE ${HDF5_INCLUDE_DIRS} )
while ${HDF5_LIBRARIES} retruns the imported library hdf5_fortran-shared, ${HDF5_INCLUDE_DIRS} returns the include directory for C/C++ not Fortran.
Please fix it.