mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user