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:
1 parent
13eab6258d
commit
1c6e1fa8b3
1 file changed
+1
-1
@@ -61,7 +61,7 @@ NGL_TARGET_LINK_LIBRARIES(nglwidgets
|
|||||||
NGL_INSTALL_TARGET(nglwidgets)
|
NGL_INSTALL_TARGET(nglwidgets)
|
||||||
|
|
||||||
# Unit test for PDFWidget
|
# Unit test for PDFWidget
|
||||||
IF(BUILD_TESTING)
|
IF(BUILD_TESTING AND TARGET nglwidgets)
|
||||||
FIND_PACKAGE(Qt6 REQUIRED COMPONENTS Test Widgets)
|
FIND_PACKAGE(Qt6 REQUIRED COMPONENTS Test Widgets)
|
||||||
ADD_EXECUTABLE(test_nglpdfwidget test_nglpdfwidget.cpp)
|
ADD_EXECUTABLE(test_nglpdfwidget test_nglpdfwidget.cpp)
|
||||||
TARGET_LINK_LIBRARIES(test_nglpdfwidget PRIVATE nglwidgets Qt6::Test Qt6::Widgets)
|
TARGET_LINK_LIBRARIES(test_nglpdfwidget PRIVATE nglwidgets Qt6::Test Qt6::Widgets)
|
||||||
|
|||||||
Reference in new issue
Block a user