Skip to content

Commit

Permalink
Fix linker flag in pkg-config file for system zlib (HDFGroup#4957)
Browse files Browse the repository at this point in the history
Previously was hardcoding `-lzlib-static` which will result in the wrong
linker flags when built with system zlib. It looks like there was logic
to figure out the library name but the resulting `libname` was never used.
  • Loading branch information
cho-m authored Oct 17, 2024
1 parent ad307bf commit e64e1ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeFilters.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
# on the target. The target returned is: ZLIB::ZLIB
get_filename_component (libname ${ZLIB_LIBRARIES} NAME_WLE)
string (REGEX REPLACE "^lib" "" libname ${libname})
set_target_properties (ZLIB::ZLIB PROPERTIES OUTPUT_NAME zlib-static)
set_target_properties (ZLIB::ZLIB PROPERTIES OUTPUT_NAME ${libname})
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ZLIB::ZLIB)
endif ()
else ()
Expand Down

0 comments on commit e64e1ea

Please sign in to comment.