diff --git a/UEFIExtract/CMakeLists.txt b/UEFIExtract/CMakeLists.txt
index ac174d7..5c90757 100644
--- a/UEFIExtract/CMakeLists.txt
+++ b/UEFIExtract/CMakeLists.txt
@@ -56,21 +56,6 @@ SET(PROJECT_SOURCES
  ../common/digest/sha256.c
  ../common/digest/sha512.c
  ../common/digest/sm3.c
- ../common/zlib/adler32.c
- ../common/zlib/compress.c
- ../common/zlib/crc32.c
- ../common/zlib/deflate.c
- ../common/zlib/gzclose.c
- ../common/zlib/gzlib.c
- ../common/zlib/gzread.c
- ../common/zlib/gzwrite.c
- ../common/zlib/inflate.c
- ../common/zlib/infback.c
- ../common/zlib/inftrees.c
- ../common/zlib/inffast.c
- ../common/zlib/trees.c
- ../common/zlib/uncompr.c
- ../common/zlib/zutil.c
 )
 
 ADD_DEFINITIONS(
@@ -82,6 +67,8 @@ ADD_DEFINITIONS(
 
 ADD_EXECUTABLE(UEFIExtract ${PROJECT_SOURCES} uefiextract.manifest)
 
+TARGET_LINK_LIBRARIES(UEFIExtract PRIVATE z)
+
 IF(UNIX)
  SET_TARGET_PROPERTIES(UEFIExtract PROPERTIES OUTPUT_NAME uefiextract)
 ENDIF()
diff --git a/UEFIFind/CMakeLists.txt b/UEFIFind/CMakeLists.txt
index c7f0a8f..19f06f7 100644
--- a/UEFIFind/CMakeLists.txt
+++ b/UEFIFind/CMakeLists.txt
@@ -53,25 +53,12 @@ SET(PROJECT_SOURCES
  ../common/digest/sha256.c
  ../common/digest/sha512.c
  ../common/digest/sm3.c
- ../common/zlib/adler32.c
- ../common/zlib/compress.c
- ../common/zlib/crc32.c
- ../common/zlib/deflate.c
- ../common/zlib/gzclose.c
- ../common/zlib/gzlib.c
- ../common/zlib/gzread.c
- ../common/zlib/gzwrite.c
- ../common/zlib/inflate.c
- ../common/zlib/infback.c
- ../common/zlib/inftrees.c
- ../common/zlib/inffast.c
- ../common/zlib/trees.c
- ../common/zlib/uncompr.c
- ../common/zlib/zutil.c
 )
 
 ADD_EXECUTABLE(UEFIFind ${PROJECT_SOURCES} uefifind.manifest)
 
+TARGET_LINK_LIBRARIES(UEFIFind PRIVATE z)
+
 IF(UNIX)
  SET_TARGET_PROPERTIES(UEFIFind PROPERTIES OUTPUT_NAME uefifind)
 ENDIF()
diff --git a/UEFITool/CMakeLists.txt b/UEFITool/CMakeLists.txt
index 363f5c1..7d21cb5 100644
--- a/UEFITool/CMakeLists.txt
+++ b/UEFITool/CMakeLists.txt
@@ -85,21 +85,6 @@ SET(PROJECT_SOURCES
  ../common/generated/intel_keym_v2.cpp
  ../common/generated/intel_acm.cpp
  ../common/kaitai/kaitaistream.cpp
- ../common/zlib/adler32.c
- ../common/zlib/compress.c
- ../common/zlib/crc32.c
- ../common/zlib/deflate.c
- ../common/zlib/gzclose.c
- ../common/zlib/gzlib.c
- ../common/zlib/gzread.c
- ../common/zlib/gzwrite.c
- ../common/zlib/inflate.c
- ../common/zlib/infback.c
- ../common/zlib/inftrees.c
- ../common/zlib/inffast.c
- ../common/zlib/trees.c
- ../common/zlib/uncompr.c
- ../common/zlib/zutil.c
 )
 
 QT_ADD_RESOURCES(PROJECT_SOURCES 
@@ -119,7 +104,7 @@ ADD_EXECUTABLE(UEFITool ${PROJECT_HEADERS} ${PROJECT_FORMS} ${PROJECT_SOURCES})
 
 TARGET_INCLUDE_DIRECTORIES(UEFITool PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")
 
-TARGET_LINK_LIBRARIES(UEFITool PRIVATE Qt6::Widgets)
+TARGET_LINK_LIBRARIES(UEFITool PRIVATE Qt6::Widgets z)
 
 ADD_SUBDIRECTORY(QHexView)
 TARGET_LINK_LIBRARIES(UEFITool PRIVATE QHexView)
