From f38b693e741cc5dba11868186db85fdb9b1172d0 Mon Sep 17 00:00:00 2001 From: Jeremy <51220084+jeremy-rifkin@users.noreply.github.com> Date: Wed, 4 Oct 2023 22:26:07 -0400 Subject: [PATCH] Update zlib handling again --- bundled/libdwarf/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bundled/libdwarf/CMakeLists.txt b/bundled/libdwarf/CMakeLists.txt index 71abcb0..148e5df 100644 --- a/bundled/libdwarf/CMakeLists.txt +++ b/bundled/libdwarf/CMakeLists.txt @@ -445,7 +445,11 @@ target_include_directories( $ ) -target_link_libraries(dwarf PUBLIC ${DW_FZLIB} ${DW_FZSTD}) +if(CMAKE_DWARF_FINDPACKAGE_Z) + target_link_libraries(dwarf PUBLIC ZLIB::ZLIB) +else() + target_link_libraries(dwarf PUBLIC ${DW_FZLIB} ${DW_FZSTD}) +endif() # TODO: Something will have to be figured out for dynamic linking, but for now there's nothing to install # if(NOT CMAKE_SKIP_INSTALL_RULES)