From 08b7398e6bc06d4b8e4ac9e5d1ea2f8cc4aeeb16 Mon Sep 17 00:00:00 2001 From: Floris Bos Date: Thu, 18 Nov 2021 11:35:32 +0100 Subject: [PATCH] Linux: explicitly link in zlib Prevent undefined reference to inflateEnd when statically linking Qt under rpi-imager embedded. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d9b6d4..f5761e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,6 +38,10 @@ elseif (UNIX) else() message("DBUS not found. Disabling udisks2 support") endif() + find_package(ZLIB) + if(ZLIB_FOUND) + set(EXTRALIBS ${EXTRALIBS} ZLIB::ZLIB) + endif() elseif (WIN32) set(DEPENDENCIES acceleratedcryptographichash.cpp dependencies/mountutils/src/windows/functions.cpp dependencies/drivelist/src/windows/list.cpp windows/winfile.cpp windows/winfile.h