Skip to content

Commit

Permalink
Merge pull request #182 from the-exodus/fix/qt6_6_zlib
Browse files Browse the repository at this point in the history
The internal Zlib module name changed again in Qt6.6
  • Loading branch information
cen1 authored Feb 29, 2024
2 parents 9d3aa3e + 39527cb commit 69bc940
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ set(QUAZIP_PACKAGE_NAME QuaZip-Qt${QUAZIP_QT_MAJOR_VERSION})
if(QUAZIP_QT_MAJOR_VERSION EQUAL 6)
find_package(Qt6 REQUIRED COMPONENTS Core Core5Compat
OPTIONAL_COMPONENTS Network Test)
# Name of the Zlib component has been changed in 6.3.1
if(Qt6_VERSION VERSION_GREATER_EQUAL "6.3.1")
# Name of the Zlib component has been changed in 6.3.1, and again in 6.6.1...
if((Qt6_VERSION VERSION_GREATER_EQUAL "6.3.1") AND (Qt6_VERSION VERSION_LESS "6.6.1"))
set(QUAZIP_QT_ZLIB_COMPONENT BundledZLIB)
elseif(Qt6_VERSION VERSION_GREATER_EQUAL "6.6.1")
set(QUAZIP_QT_ZLIB_COMPONENT ZlibPrivate)
else()
set(QUAZIP_QT_ZLIB_COMPONENT Zlib)
endif()
Expand Down

0 comments on commit 69bc940

Please sign in to comment.