Fix test_nglpdfwidget build: Poppler-Qt6 packages and QT6_GUI_AVAILABLE detection

- Add libpoppler-dev and libpoppler-qt6-dev to APT_PACKAGES in new_docker_build.sh
- Fix QT6_GUI_AVAILABLE detection logic: check OpenGL_FOUND before setting TRUE
- Add test_nglpdfwidget to RELEASE_GROUP3_TARGETS for explicit build
- Use unique Docker image name: legatus-qt6-prebuilt:latest

Test result: test_nglpdfwidget now builds and passes CTest (0.07 sec)
Release build: 4/7 tests pass (57%), 3 tests excluded as expected

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torstenandCopilot committed 2026-10-08 08:30:45 +00:00
1 parent 87fe045bbe
commit d7f58c558d
2 files changed
+13 -5

No files matched your search

@@ -300,9 +300,15 @@ find_package(Qt6 6.2 COMPONENTS Concurrent Core LinguistTools Network
Multimedia Sql SerialPort Test Xml Positioning Svg WebSockets PrintSupport OpenGL QUIET)
if(Qt6_FOUND)
# Skip GUI find_package - it fails without OpenGL. We'll create manual targets below.
set(QT6_GUI_AVAILABLE FALSE)
message(STATUS "Found Qt6 (GUI will be manually configured): ${Qt6Core_VERSION}")
# Check if OpenGL was found (GUI support available)
if(OpenGL_FOUND)
set(QT6_GUI_AVAILABLE TRUE)
message(STATUS "Found Qt6 with GUI support (OpenGL): ${Qt6Core_VERSION}")
else()
# Skip GUI find_package - it fails without OpenGL. We'll create manual targets below.
set(QT6_GUI_AVAILABLE FALSE)
message(STATUS "Found Qt6 (GUI will be manually configured): ${Qt6Core_VERSION}")
endif()
endif()
# If Qt6 not found yet, try with full component list including OpenGL
@@ -251,6 +251,8 @@ APT_PACKAGES=(
cmake
libboost-dev
libkf6texttemplate-dev
libpoppler-dev
libpoppler-qt6-dev
libqt6core6
libqt6gui6
libqt6widgets6
@@ -547,12 +549,12 @@ RELEASE_GROUP3_TARGETS=(
ngl_codegen
MockCoordTrans
# Test executables for release scope modules
# Note: test_nglpdfwidget excluded - requires Poppler-Qt6 (not in release scope)
# Note: nglcomp_test excluded - compression "Unknown error" in Qt6 (requires investigation)
# Note: grantlee_parser_smoke excluded - requires ktexttemplate_defaulttags plugin (not in release scope)
aes_crypt_test
ngltools_qt_smoke
lts_coord_trans_unit_test
test_nglpdfwidget
)
GROUP4_TARGETS=(
@@ -939,7 +941,7 @@ DELETE_PREBUILT_IMAGE="$(normalize_on_off "$DELETE_PREBUILT_IMAGE" "DELETE_PREBU
if [[ "${USE_PREBUILT_IMAGE}" == "ON" ]]; then
DOCKER_IMAGE="${DOCKER_IMAGE:-legatus-qt6-prebuilt:latest}"
else
DOCKER_IMAGE="${DOCKER_IMAGE:-ubuntu:26.04}"
DOCKER_IMAGE="${DOCKER_IMAGE:-legatus-qt6-prebuilt:latest}"
fi
# Default for extra CMake flags (set via --cmake_build_flags or environment)