chore(CMake): make KDReports optional for LtsPrinting to allow configure without printing deps

This commit is contained in:
torsten committed 2026-07-17 12:59:03 +02:00
1 parent 5cc294a919
commit 647f817a04
1 file changed
+11 -8
+11 -8
View File
@@ -6,7 +6,7 @@
# Created by Christian Ehrlicher, SLSE, 2017-12-05
#
FIND_PACKAGE(KDReports REQUIRED)
FIND_PACKAGE(KDReports)
SET(SRCS
printing_base.cpp
@@ -15,13 +15,13 @@ SET(SRCS
printing.h
)
NGL_ADD_LIBRARY(WS LtsPrinting SHARED ${SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(LtsPrinting
if (KDReports_FOUND)
NGL_ADD_LIBRARY(WS LtsPrinting SHARED ${SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(LtsPrinting
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
)
NGL_TARGET_LINK_LIBRARIES(LtsPrinting
)
NGL_TARGET_LINK_LIBRARIES(LtsPrinting
PRIVATE
KDReports::KDReports
LtsSessionData
@@ -31,5 +31,8 @@ NGL_TARGET_LINK_LIBRARIES(LtsPrinting
PUBLIC
Qt5::PrintSupport
Qt5::Core
)
NGL_INSTALL_TARGET(LtsPrinting)
)
NGL_INSTALL_TARGET(LtsPrinting)
else()
message(STATUS "KDReports not found; skipping LtsPrinting target")
endif()