summaryrefslogtreecommitdiffstats
path: root/Modules/FindHDF5.cmake
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2017-01-04 20:03:42 (GMT)
committerBrad King <brad.king@kitware.com>2017-01-16 16:13:48 (GMT)
commit5201a3065b1c49ee2628d95c860b667e9e2b182e (patch)
tree32ebb68c371d9d20fc94382d5f77e8317e3476a2 /Modules/FindHDF5.cmake
parent35ad12f99e71515f9cc65b1219160b88095a5f6b (diff)
downloadCMake-5201a3065b1c49ee2628d95c860b667e9e2b182e.zip
CMake-5201a3065b1c49ee2628d95c860b667e9e2b182e.tar.gz
CMake-5201a3065b1c49ee2628d95c860b667e9e2b182e.tar.bz2
FindHDF5: use the target rather than the path
On Windows, the `LOCATION` property gets the path to the `.dll` rather than the `.lib` which is unsuitable for linking.
Diffstat (limited to 'Modules/FindHDF5.cmake')
-rw-r--r--Modules/FindHDF5.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 16764e0..6e5a25e 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -439,8 +439,8 @@ if(NOT HDF5_FOUND AND NOT HDF5_ROOT)
set(HDF5_${_lang}_LIBRARY ${_lang_location} CACHE PATH
"HDF5 ${_lang} library" )
mark_as_advanced(HDF5_${_lang}_LIBRARY)
- list(APPEND HDF5_LIBRARIES ${HDF5_${_lang}_LIBRARY})
- set(HDF5_${_lang}_LIBRARIES ${HDF5_${_lang}_LIBRARY})
+ 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)
@@ -449,8 +449,8 @@ if(NOT HDF5_FOUND AND NOT HDF5_ROOT)
set(HDF5_${_lang}_HL_LIBRARY ${_lang_hl_location} CACHE PATH
"HDF5 ${_lang} HL library" )
mark_as_advanced(HDF5_${_lang}_HL_LIBRARY)
- list(APPEND HDF5_HL_LIBRARIES ${HDF5_${_lang}_HL_LIBRARY})
- set(HDF5_${_lang}_HL_LIBRARIES ${HDF5_${_lang}_HL_LIBRARY})
+ list(APPEND HDF5_HL_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix})
+ set(HDF5_${_lang}_HL_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix})
set(HDF5_HL_FOUND True)
endif()
endif()