chore(CMake): make KDReports optional for LtsPrinting to allow configure without printing deps
This commit is contained in:
1 parent
5cc294a919
commit
647f817a04
1 file changed
+22
-19
@@ -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,21 +15,24 @@ SET(SRCS
|
||||
printing.h
|
||||
)
|
||||
|
||||
|
||||
NGL_ADD_LIBRARY(WS LtsPrinting SHARED ${SRCS})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(LtsPrinting
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsPrinting
|
||||
PRIVATE
|
||||
KDReports::KDReports
|
||||
LtsSessionData
|
||||
LtsSession
|
||||
nglsettings
|
||||
ngltools
|
||||
PUBLIC
|
||||
Qt5::PrintSupport
|
||||
Qt5::Core
|
||||
)
|
||||
NGL_INSTALL_TARGET(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
|
||||
PRIVATE
|
||||
KDReports::KDReports
|
||||
LtsSessionData
|
||||
LtsSession
|
||||
nglsettings
|
||||
ngltools
|
||||
PUBLIC
|
||||
Qt5::PrintSupport
|
||||
Qt5::Core
|
||||
)
|
||||
NGL_INSTALL_TARGET(LtsPrinting)
|
||||
else()
|
||||
message(STATUS "KDReports not found; skipping LtsPrinting target")
|
||||
endif()
|
||||
Reference in new issue
Block a user