chore(cmake): guard test_nglpdfwidget by TARGET nglwidgets to avoid linking if library missing\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This commit is contained in:
torsten committed 2026-07-17 13:22:23 +02:00
1 parent 13eab6258d
commit 1c6e1fa8b3
1 file changed
+1 -1
+1 -1
View File
@@ -61,7 +61,7 @@ NGL_TARGET_LINK_LIBRARIES(nglwidgets
NGL_INSTALL_TARGET(nglwidgets)
# Unit test for PDFWidget
IF(BUILD_TESTING)
IF(BUILD_TESTING AND TARGET nglwidgets)
FIND_PACKAGE(Qt6 REQUIRED COMPONENTS Test Widgets)
ADD_EXECUTABLE(test_nglpdfwidget test_nglpdfwidget.cpp)
TARGET_LINK_LIBRARIES(test_nglpdfwidget PRIVATE nglwidgets Qt6::Test Qt6::Widgets)