summaryrefslogtreecommitdiff
path: root/Modules/FindHDF5.cmake
diff options
context:
space:
mode:
authorKris Thielemans <kris.f.thielemans@hotmail.com>2017-07-24 09:16:29 +0200
committerBrad King <brad.king@kitware.com>2017-08-03 09:49:47 -0400
commit9310d00822378e24dbd43849f9892d2f775ca3ff (patch)
treee3bce2e10860fde171aa2ff02c92ac56a57ac258 /Modules/FindHDF5.cmake
parentfc9828448d54a63b7fc09ee044b6b0246632e011 (diff)
downloadcmake-9310d00822378e24dbd43849f9892d2f775ca3ff.tar.gz
FindHDF5: for a static imported config, use CONFIG-specific library
first check the LOCATION_<CONFIG> propertiy to find the library, then LOCATION
Diffstat (limited to 'Modules/FindHDF5.cmake')
-rw-r--r--Modules/FindHDF5.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index d3fd0eeb6a..bbcfe75fc8 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -495,7 +495,10 @@ if(NOT HDF5_FOUND AND NOT HDF5_NO_FIND_PACKAGE_CONFIG_FILE)
get_target_property(_lang_location ${HDF5_${_lang}_TARGET}${_suffix} IMPORTED_IMPLIB_${_hdf5_imported_conf} )
if (NOT _lang_location)
# no import lib, just try LOCATION
- get_target_property(_lang_location ${HDF5_${_lang}_TARGET}${_suffix} 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)
+ endif()
endif()
if( _lang_location )
set(HDF5_${_lang}_LIBRARY ${_lang_location})