summaryrefslogtreecommitdiffstats
path: root/src/printsupport/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/printsupport/CMakeLists.txt')
-rw-r--r--src/printsupport/CMakeLists.txt20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/printsupport/CMakeLists.txt b/src/printsupport/CMakeLists.txt
index 1ff5fd552f..0e6e1cc012 100644
--- a/src/printsupport/CMakeLists.txt
+++ b/src/printsupport/CMakeLists.txt
@@ -14,14 +14,16 @@ qt_internal_add_module(PrintSupport
kernel/qplatformprintplugin.cpp kernel/qplatformprintplugin.h
kernel/qprint.cpp kernel/qprint_p.h
kernel/qprintdevice.cpp kernel/qprintdevice_p.h
- kernel/qprintengine.h
+ kernel/qprintengine.cpp kernel/qprintengine.h
kernel/qprintengine_pdf.cpp kernel/qprintengine_pdf_p.h
kernel/qprinter.cpp kernel/qprinter.h kernel/qprinter_p.h
kernel/qprinterinfo.cpp kernel/qprinterinfo.h kernel/qprinterinfo_p.h
kernel/qtprintsupportglobal.h kernel/qtprintsupportglobal_p.h
DEFINES
+ QT_NO_CONTEXTLESS_CONNECT
QT_NO_FOREACH
QT_NO_USING_NAMESPACE
+ QT_USE_NODISCARD_FILE_OPEN
INCLUDE_DIRECTORIES
dialogs
widgets
@@ -37,7 +39,6 @@ qt_internal_add_module(PrintSupport
Qt::CorePrivate
Qt::GuiPrivate
Qt::WidgetsPrivate
- GENERATE_CPP_EXPORTS
QPA_HEADER_FILTERS
"(^|/)qplatform.+\\.h$"
)
@@ -88,6 +89,19 @@ qt_internal_extend_target(PrintSupport CONDITION QT_FEATURE_cups AND UNIX AND NO
kernel/qcups.cpp kernel/qcups_p.h
)
+# qprint_p.h includes cups/ppd.h, so PrintSupportPrivate should add the related
+# interface include path.
+qt_internal_extend_target(PrintSupportPrivate CONDITION QT_FEATURE_cups AND UNIX AND NOT APPLE
+ PUBLIC_INCLUDE_DIRECTORIES
+ $<TARGET_PROPERTY:Cups::Cups,INTERFACE_INCLUDE_DIRECTORIES>
+)
+# Ensure that PrintSupport requires Cups if the 'cups' feature enabled and
+# Cups is never linked.
+if(QT_FEATURE_cups AND UNIX AND NOT APPLE)
+ qt_internal_add_target_include_dirs(PrintSupport Cups::Cups)
+ qt_record_extra_third_party_dependency(PrintSupport Cups::Cups)
+endif()
+
qt_internal_extend_target(PrintSupport CONDITION QT_FEATURE_cupsjobwidget AND UNIX AND NOT APPLE
SOURCES
widgets/qcupsjobwidget.cpp widgets/qcupsjobwidget.ui widgets/qcupsjobwidget_p.h
@@ -177,7 +191,7 @@ qt_internal_extend_target(PrintSupport CONDITION QT_FEATURE_printdialog AND WIN3
dialogs/qprintdialog_win.cpp
)
-qt_internal_extend_target(PrintSupport CONDITION QT_FEATURE_printdialog AND UNIX AND NOT APPLE
+qt_internal_extend_target(PrintSupport CONDITION QT_FEATURE_printdialog AND UNIX AND NOT MACOS
SOURCES
dialogs/qpagesetupdialog_unix.cpp dialogs/qpagesetupdialog_unix_p.h
dialogs/qprintdialog_unix.cpp