stachenov / quazip

Qt/C++ wrapper over minizip
Other
582 stars 232 forks source link

Can't build with QUAZIP_USE_QT_ZLIB on qt6 on windows #146

Closed xlazom00 closed 1 year ago

xlazom00 commented 2 years ago

Can't build with QUAZIP_USE_QT_ZLIB on qt6 on windows

cmake log

-- Could NOT find Qt6Zlib (missing: Qt6Zlib_DIR)
CMake Warning at C:/_WORK/lib_qt6_3_1_x64/qt5/qtbase/lib/cmake/Qt6/Qt6Config.cmake:263 (message):
  Failed to find Qt component "Zlib".

  Expected Config file at
  "C:/_WORK/lib_qt6_3_1_x64/qt5/qtbase/lib/cmake/Qt6Zlib/Qt6ZlibConfig.cmake"
  does NOT exist

Call Stack (most recent call first):
  CMakeLists.txt:78 (find_package)

They moved cmake to Qt6ZlibPrivate

And I also raised this bug https://bugreports.qt.io/browse/QTBUG-104475

stachenov commented 2 years ago

Well, apparently there’s nothing I can do about it since Qt 6 seems to consider Zlib a private implementation detail not to be used externally.

xlazom00 commented 2 years ago

@stachenov private from Qt perspective mean that you can use that but API isn't stable and they don't guarantee anything. But I think quazip can still support and use that. private is common qt feature

cen1 commented 2 years ago

Technically, if the library is still there in one form or the other, CMake could find it, in worst case with a custom Find.cmake script. However, if upstream stays as is, the more pragmatic decision is to simply disable this flag for Qt6. Especially with tools like conan, installing your own zlib is not a big deal.