Commit cf0d8f1f authored by Brad King's avatar Brad King

FindHDF5: Restore HDF5_INCLUDE_DIR in all code paths

This compatibility variable should be set no matter which method was
used to find HDF5.  Even if `HDF5_INCLUDE_DIRS` was set by copying the
`HDF5_INCLUDE_DIR` value from `hdf5-config.cmake` it will not hurt to
copy the same value back.

Issue: #16566
parent 5564c017
......@@ -796,17 +796,18 @@ if( NOT HDF5_FOUND )
"HDF5 library compiled with parallel IO support" )
mark_as_advanced( HDF5_IS_PARALLEL )
# For backwards compatibility we set HDF5_INCLUDE_DIR to the value of
# HDF5_INCLUDE_DIRS
if( HDF5_INCLUDE_DIRS )
set( HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIRS}" )
endif()
set(HDF5_REQUIRED_VARS HDF5_LIBRARIES HDF5_INCLUDE_DIRS)
if(FIND_HL)
list(APPEND HDF5_REQUIRED_VARS HDF5_HL_LIBRARIES)
endif()
endif()
# For backwards compatibility we set HDF5_INCLUDE_DIR to the value of
# HDF5_INCLUDE_DIRS
if( HDF5_INCLUDE_DIRS )
set( HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIRS}" )
endif()
# If HDF5_REQUIRED_VARS is empty at this point, then it's likely that
# something external is trying to explicitly pass already found
# locations
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment