diff options
author | Brad King <brad.king@kitware.com> | 2017-02-03 15:57:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-03 15:57:10 (GMT) |
commit | cf0d8f1fd6ad5d4bc85d7788af459238df494260 (patch) | |
tree | 589aa80fec33626ae62a8564f26e4c6b061a5bd5 /Modules | |
parent | 5564c01703c20f992769f4e152bcc74ceddc5942 (diff) | |
download | CMake-cf0d8f1fd6ad5d4bc85d7788af459238df494260.zip CMake-cf0d8f1fd6ad5d4bc85d7788af459238df494260.tar.gz CMake-cf0d8f1fd6ad5d4bc85d7788af459238df494260.tar.bz2 |
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
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindHDF5.cmake | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index b10e313..e1199a7 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -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 |