Restore BZip2 in nglcompression (legacy REQUIRED it)

Define HAVE_BZIP2 so the real impl compiles instead of the stub; link libbz2; nglcomp_test green
This commit is contained in:
berrux-dev committed 2026-10-21 10:18:32 +02:00
1 parent 598fc2560e
commit 131a6714cf
1 file changed
+9 -4
@@ -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)