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
|
# Created by Christian Ehrlicher, SLSE, 2017-12-05
|
||||||
#
|
#
|
||||||
|
|
||||||
FIND_PACKAGE(KDReports REQUIRED)
|
FIND_PACKAGE(KDReports)
|
||||||
|
|
||||||
SET(SRCS
|
SET(SRCS
|
||||||
printing_base.cpp
|
printing_base.cpp
|
||||||
@@ -15,21 +15,24 @@ SET(SRCS
|
|||||||
printing.h
|
printing.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (KDReports_FOUND)
|
||||||
NGL_ADD_LIBRARY(WS LtsPrinting SHARED ${SRCS})
|
NGL_ADD_LIBRARY(WS LtsPrinting SHARED ${SRCS})
|
||||||
NGL_TARGET_INCLUDE_DIRECTORIES(LtsPrinting
|
NGL_TARGET_INCLUDE_DIRECTORIES(LtsPrinting
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||||
)
|
)
|
||||||
NGL_TARGET_LINK_LIBRARIES(LtsPrinting
|
NGL_TARGET_LINK_LIBRARIES(LtsPrinting
|
||||||
PRIVATE
|
PRIVATE
|
||||||
KDReports::KDReports
|
KDReports::KDReports
|
||||||
LtsSessionData
|
LtsSessionData
|
||||||
LtsSession
|
LtsSession
|
||||||
nglsettings
|
nglsettings
|
||||||
ngltools
|
ngltools
|
||||||
PUBLIC
|
PUBLIC
|
||||||
Qt5::PrintSupport
|
Qt5::PrintSupport
|
||||||
Qt5::Core
|
Qt5::Core
|
||||||
)
|
)
|
||||||
NGL_INSTALL_TARGET(LtsPrinting)
|
NGL_INSTALL_TARGET(LtsPrinting)
|
||||||
|
else()
|
||||||
|
message(STATUS "KDReports not found; skipping LtsPrinting target")
|
||||||
|
endif()
|
||||||
Reference in new issue
Block a user