From 131a6714cf95189098c81e3019c4b2b2442176b0 Mon Sep 17 00:00:00 2001 From: berrux_dev Date: Wed, 21 Oct 2026 10:18:32 +0200 Subject: [PATCH] Restore BZip2 in nglcompression (legacy REQUIRED it) Define HAVE_BZIP2 so the real impl compiles instead of the stub; link libbz2; nglcomp_test green --- .../Z/src/nglcompression/CMakeLists.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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)