Skip to content
Snippets Groups Projects
Commit 4150048a authored by Kris Thielemans's avatar Kris Thielemans Committed by Brad King
Browse files

FindHDF5: unset some variables

prefixed some local variables with _hdf5 and unset them at the end
(still more of these to do)
parent 9310d008
No related branches found
No related tags found
No related merge requests found
......@@ -492,33 +492,35 @@ if(NOT HDF5_FOUND AND NOT HDF5_NO_FIND_PACKAGE_CONFIG_FILE)
endif()
# Find library for this target. Complicated as on Windows with a DLL, we need to search for the import-lib.
_HDF5_select_imported_config(${HDF5_${_lang}_TARGET}${_suffix} _hdf5_imported_conf)
get_target_property(_lang_location ${HDF5_${_lang}_TARGET}${_suffix} IMPORTED_IMPLIB_${_hdf5_imported_conf} )
if (NOT _lang_location)
get_target_property(_hdf5_lang_location ${HDF5_${_lang}_TARGET}${_suffix} IMPORTED_IMPLIB_${_hdf5_imported_conf} )
if (NOT _hdf5_lang_location)
# no import lib, just try LOCATION
get_target_property(_lang_location ${HDF5_${_lang}_TARGET}${_suffix} LOCATION_${_hdf5_imported_conf})
if (NOT _lang_location)
get_target_property(_lang_location ${HDF5_${_lang}_TARGET}${_suffix} LOCATION)
get_target_property(_hdf5_lang_location ${HDF5_${_lang}_TARGET}${_suffix} LOCATION_${_hdf5_imported_conf})
if (NOT _hdf5_lang_location)
get_target_property(_hdf5_lang_location ${HDF5_${_lang}_TARGET}${_suffix} LOCATION)
endif()
endif()
if( _lang_location )
set(HDF5_${_lang}_LIBRARY ${_lang_location})
if( _hdf5_lang_location )
set(HDF5_${_lang}_LIBRARY ${_hdf5_lang_location})
list(APPEND HDF5_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix})
set(HDF5_${_lang}_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix})
set(HDF5_${_lang}_FOUND True)
endif()
if(FIND_HL)
get_target_property(__lang_hl_location ${HDF5_${_lang}_HL_TARGET}${_suffix} IMPORTED_IMPLIB_${_hdf5_imported_conf} )
if (NOT _lang_hl_location)
get_target_property(_lang_hl_location ${HDF5_${_lang}_HL_TARGET}${_suffix} LOCATION)
if (NOT _hdf5_lang_hl_location)
get_target_property(_hdf5_lang_hl_location ${HDF5_${_lang}_HL_TARGET}${_suffix} LOCATION)
endif()
if( _lang_hl_location )
set(HDF5_${_lang}_HL_LIBRARY ${_lang_hl_location})
if( _hdf5_lang_hl_location )
set(HDF5_${_lang}_HL_LIBRARY ${_hdf5_lang_hl_location})
list(APPEND HDF5_HL_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix})
set(HDF5_${_lang}_HL_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix})
set(HDF5_HL_FOUND True)
endif()
unset(_hdf5_lang_hl_location)
endif()
unset( _hdf5_imported_conf)
unset(_hdf5_imported_conf)
unset(_hdf5_lang_location)
endforeach()
endif()
endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment