diff --git a/qt6-after/qt6-migrated-legatus/Z/src/nglcompression/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Z/src/nglcompression/CMakeLists.txt index a4e2f7ca7..2804f874b 100755 --- a/qt6-after/qt6-migrated-legatus/Z/src/nglcompression/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Z/src/nglcompression/CMakeLists.txt @@ -5,9 +5,8 @@ # $Author$ # -# BZip2 stub - libbz2-dev not available, disable bzip2 support -SET(HAVE_BZIP2 FALSE) -MESSAGE(STATUS "BZip2 disabled - development headers not available") +# BZip2 (legacy REQUIRED it; defines HAVE_BZIP2 so the real impl compiles instead of the stub) +FIND_PACKAGE(BZip2 REQUIRED) SET(nglcomp_SRCS nglcomp_bzip2iodevice.cpp @@ -25,8 +24,14 @@ NGL_TARGET_LINK_LIBRARIES(nglcompression PRIVATE Qt6::Concurrent NGLLogger + ${BZIP2_LIBRARIES} ) -# BZip2 disabled - no linking needed +NGL_TARGET_INCLUDE_DIRECTORIES(nglcompression + PRIVATE + ${BZIP2_INCLUDE_DIR} +) +# Enable the real bzip2 impl (guard in nglcomp_bzip2iodevice.{h,cpp}); legacy always compiled it +TARGET_COMPILE_DEFINITIONS(nglcompression PRIVATE HAVE_BZIP2) NGL_INSTALL_TARGET(nglcompression) IF(BUILD_WS AND BUILD_TESTING)