mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-02 04:38:46 -06:00
FindHDF5: support the hdf5hl_fortran-based variable names
Fixes: #21537
This commit is contained in:
@@ -1057,12 +1057,14 @@ if (HDF5_FOUND)
|
|||||||
continue ()
|
continue ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
set(hdf5_alt_target_name "")
|
||||||
if (hdf5_lang STREQUAL "C")
|
if (hdf5_lang STREQUAL "C")
|
||||||
set(hdf5_target_name "hdf5_hl")
|
set(hdf5_target_name "hdf5_hl")
|
||||||
elseif (hdf5_lang STREQUAL "CXX")
|
elseif (hdf5_lang STREQUAL "CXX")
|
||||||
set(hdf5_target_name "hdf5_hl_cpp")
|
set(hdf5_target_name "hdf5_hl_cpp")
|
||||||
elseif (hdf5_lang STREQUAL "Fortran")
|
elseif (hdf5_lang STREQUAL "Fortran")
|
||||||
set(hdf5_target_name "hdf5_hl_fortran")
|
set(hdf5_target_name "hdf5_hl_fortran")
|
||||||
|
set(hdf5_alt_target_name "hdf5hl_fortran")
|
||||||
else ()
|
else ()
|
||||||
continue ()
|
continue ()
|
||||||
endif ()
|
endif ()
|
||||||
@@ -1081,6 +1083,8 @@ if (HDF5_FOUND)
|
|||||||
set(_hdf5_location "${HDF5_${hdf5_lang}_HL_LIBRARY}")
|
set(_hdf5_location "${HDF5_${hdf5_lang}_HL_LIBRARY}")
|
||||||
elseif (DEFINED "HDF5_${hdf5_lang}_LIBRARY_${hdf5_target_name}")
|
elseif (DEFINED "HDF5_${hdf5_lang}_LIBRARY_${hdf5_target_name}")
|
||||||
set(_hdf5_location "${HDF5_${hdf5_lang}_LIBRARY_${hdf5_target_name}}")
|
set(_hdf5_location "${HDF5_${hdf5_lang}_LIBRARY_${hdf5_target_name}}")
|
||||||
|
elseif (hdf5_alt_target_name AND DEFINED "HDF5_${hdf5_lang}_LIBRARY_${hdf5_alt_target_name}")
|
||||||
|
set(_hdf5_location "${HDF5_${hdf5_lang}_LIBRARY_${hdf5_alt_target_name}}")
|
||||||
else ()
|
else ()
|
||||||
# Error if we still don't have the location.
|
# Error if we still don't have the location.
|
||||||
message(SEND_ERROR
|
message(SEND_ERROR
|
||||||
|
|||||||
Reference in New Issue
Block a user