FindHDF5: Provide HDF5_<lang>_INCLUDE_DIRS
Depending on which path is used by FindHDF5, the HDF5_${__lang}_INCLUDE_DIRS
variable is not always set. In particular, when using find_path(HDF5_${__lang}_INCLUDE_DIR ...)
is used, but the (language-specific) _DIRS
variable is not set. In all other cases, the _DIR
variable is not set.
We should always set _DIRS
. Optionally, we could set _DIR
to _DIRS
as I did before
foreach(__lang IN LISTS HDF5_LANGUAGE_BINDINGS)
if ( HDF5_${__lang}_INCLUDE_DIRS )
set(HDF5_${__lang}_INCLUDE_DIR "${HDF5_${__lang}_INCLUDE_DIRS}")
endif()
endforeach()
but I guess @brad.king doesn't like that. Fine for me, as the _DIR
variable wasn't always set since 00405af0 so users cannot rely on existence of the (deprecated) variable anyway.