From 5fea9654da041d1d0fb0be208b708eed79d2fc15 Mon Sep 17 00:00:00 2001 From: Bradley Lowekamp Date: Wed, 20 Nov 2024 19:46:13 +0000 Subject: [PATCH] ENH: Support thirdparty hdf5 using system zlib --- Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeLists.txt b/Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeLists.txt index d974e1de678..52f753ee3aa 100644 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeLists.txt +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeLists.txt @@ -1213,7 +1213,11 @@ endif () # Assuming they don't foreach (libs ${LINK_COMP_LIBS}) # set (_PKG_CONFIG_REQUIRES_PRIVATE "${_PKG_CONFIG_REQUIRES_PRIVATE} -l${libs}") - get_target_property (libname ${libs} OUTPUT_NAME) + if (TARGET ${libs}) + get_target_property (libname ${libs} OUTPUT_NAME) + else() + set(libname ${libs}) + endif() set (_PKG_CONFIG_LIBS_PRIVATE "${_PKG_CONFIG_LIBS_PRIVATE} -l${libname}") endforeach ()