CMake: Build PrintSupport module and tests
Change-Id: I7ac14f5214619f547af7221d213ac7e338a05bfc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
e57a94cbd8
commit
99315c2129
98
src/printsupport/CMakeLists.txt
Normal file
98
src/printsupport/CMakeLists.txt
Normal file
@ -0,0 +1,98 @@
|
||||
# Generated from printsupport.pro.
|
||||
|
||||
#####################################################################
|
||||
## PrintSupport Module:
|
||||
#####################################################################
|
||||
|
||||
add_qt_module(PrintSupport
|
||||
SOURCES
|
||||
kernel/qpaintengine_alpha.cpp kernel/qpaintengine_alpha_p.h
|
||||
kernel/qplatformprintdevice.cpp kernel/qplatformprintdevice.h
|
||||
kernel/qplatformprintersupport.cpp kernel/qplatformprintersupport.h
|
||||
kernel/qplatformprintplugin.cpp kernel/qplatformprintplugin.h
|
||||
kernel/qprint_p.h
|
||||
kernel/qprintdevice.cpp kernel/qprintdevice_p.h
|
||||
kernel/qprintengine.h
|
||||
kernel/qprintengine_pdf.cpp
|
||||
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_USING_NAMESPACE
|
||||
QT_NO_FOREACH
|
||||
INCLUDE_DIRECTORIES widgets dialogs
|
||||
LIBRARIES Qt::CorePrivate Qt::GuiPrivate Qt::WidgetsPrivate
|
||||
PUBLIC_LIBRARIES Qt::Gui # for QPageSize
|
||||
)
|
||||
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
extend_target(PrintSupport CONDITION QT_FEATURE_printpreviewwidget
|
||||
SOURCES
|
||||
kernel/qpaintengine_preview.cpp kernel/qpaintengine_preview_p.h
|
||||
)
|
||||
|
||||
extend_target(PrintSupport CONDITION WIN32
|
||||
SOURCES
|
||||
kernel/qprintengine_win.cpp kernel/qprintengine_win_p.h
|
||||
)
|
||||
|
||||
extend_target(PrintSupport CONDITION WIN32 AND NOT WINRT
|
||||
LIBRARIES winspool comdlg32 gdi32 user32
|
||||
)
|
||||
|
||||
extend_target(PrintSupport CONDITION (UNIX AND NOT APPLE) AND QT_FEATURE_cups
|
||||
SOURCES
|
||||
kernel/qcups.cpp kernel/qcups_p.h
|
||||
)
|
||||
|
||||
extend_target(PrintSupport CONDITION QT_FEATURE_printpreviewwidget
|
||||
SOURCES
|
||||
widgets/qprintpreviewwidget.cpp widgets/qprintpreviewwidget.h
|
||||
)
|
||||
|
||||
extend_target(PrintSupport CONDITION (UNIX AND NOT APPLE) AND QT_FEATURE_cupsjobwidget
|
||||
SOURCES
|
||||
widgets/qcupsjobwidget.cpp widgets/qcupsjobwidget.ui widgets/qcupsjobwidget_p.h
|
||||
)
|
||||
|
||||
extend_target(PrintSupport CONDITION QT_FEATURE_printdialog
|
||||
SOURCES
|
||||
dialogs/qabstractprintdialog.cpp dialogs/qabstractprintdialog.h dialogs/qabstractprintdialog_p.h
|
||||
dialogs/qpagesetupdialog.cpp dialogs/qpagesetupdialog.h dialogs/qpagesetupdialog_p.h
|
||||
dialogs/qpagesetupwidget.ui
|
||||
dialogs/qprintdialog.h dialogs/qprintdialog.qrc
|
||||
)
|
||||
|
||||
extend_target(PrintSupport CONDITION QT_FEATURE_printdialog AND macos
|
||||
SOURCES
|
||||
dialogs/qpagesetupdialog_mac.mm
|
||||
dialogs/qprintdialog_mac.mm
|
||||
LIBRARIES
|
||||
${FWAppKit}
|
||||
)
|
||||
|
||||
extend_target(PrintSupport CONDITION QT_FEATURE_printdialog AND WIN32
|
||||
SOURCES
|
||||
dialogs/qpagesetupdialog_win.cpp
|
||||
dialogs/qprintdialog_win.cpp
|
||||
)
|
||||
|
||||
extend_target(PrintSupport CONDITION (QT_FEATURE_printdialog AND UNIX) AND NOT APPLE
|
||||
SOURCES
|
||||
dialogs/qpagesetupdialog_unix.cpp dialogs/qpagesetupdialog_unix_p.h
|
||||
dialogs/qprintdialog_unix.cpp
|
||||
dialogs/qprintpropertieswidget.ui
|
||||
dialogs/qprintsettingsoutput.ui
|
||||
dialogs/qprintwidget.ui
|
||||
INCLUDE_DIRECTORIES
|
||||
${PROJECT_SOURCE_DIR}/src/plugins/printsupport/cups
|
||||
)
|
||||
|
||||
extend_target(PrintSupport CONDITION QT_FEATURE_printpreviewdialog
|
||||
SOURCES
|
||||
dialogs/qprintpreviewdialog.cpp dialogs/qprintpreviewdialog.h
|
||||
)
|
||||
|
||||
add_qt_docs(./doc/qtprintsupport.qdocconf)
|
57
src/printsupport/configure.cmake
Normal file
57
src/printsupport/configure.cmake
Normal file
@ -0,0 +1,57 @@
|
||||
|
||||
|
||||
#### Inputs
|
||||
|
||||
|
||||
|
||||
#### Libraries
|
||||
|
||||
|
||||
|
||||
#### Tests
|
||||
|
||||
|
||||
|
||||
#### Features
|
||||
|
||||
qt_feature("cups" PUBLIC PRIVATE
|
||||
SECTION "Painting"
|
||||
LABEL "CUPS"
|
||||
PURPOSE "Provides support for the Common Unix Printing System."
|
||||
CONDITION libs.cups AND QT_FEATURE_printer AND QT_FEATURE_datestring OR FIXME
|
||||
)
|
||||
qt_feature_definition("cups" "QT_NO_CUPS" NEGATE VALUE "1")
|
||||
qt_feature("cupsjobwidget" PUBLIC PRIVATE
|
||||
SECTION "Widgets"
|
||||
LABEL "CUPS job control widget"
|
||||
CONDITION ( QT_FEATURE_buttongroup ) AND ( QT_FEATURE_calendarwidget ) AND ( QT_FEATURE_checkbox ) AND ( QT_FEATURE_combobox ) AND ( QT_FEATURE_cups ) AND ( QT_FEATURE_datetimeedit ) AND ( QT_FEATURE_groupbox ) AND ( QT_FEATURE_tablewidget )
|
||||
)
|
||||
qt_feature_definition("cupsjobwidget" "QT_NO_CUPSJOBWIDGET" NEGATE VALUE "1")
|
||||
qt_feature("printer" PUBLIC
|
||||
SECTION "Painting"
|
||||
LABEL "QPrinter"
|
||||
PURPOSE "Provides a printer backend of QPainter."
|
||||
CONDITION NOT APPLE_UIKIT AND NOT WINRT AND QT_FEATURE_picture AND QT_FEATURE_temporaryfile AND QT_FEATURE_pdf
|
||||
)
|
||||
qt_feature_definition("printer" "QT_NO_PRINTER" NEGATE VALUE "1")
|
||||
qt_feature("printpreviewwidget" PUBLIC
|
||||
SECTION "Widgets"
|
||||
LABEL "QPrintPreviewWidget"
|
||||
PURPOSE "Provides a widget for previewing page layouts for printer output."
|
||||
CONDITION QT_FEATURE_graphicsview AND QT_FEATURE_printer AND QT_FEATURE_mainwindow
|
||||
)
|
||||
qt_feature_definition("printpreviewwidget" "QT_NO_PRINTPREVIEWWIDGET" NEGATE VALUE "1")
|
||||
qt_feature("printdialog" PUBLIC
|
||||
SECTION "Dialogs"
|
||||
LABEL "QPrintDialog"
|
||||
PURPOSE "Provides a dialog widget for specifying printer configuration."
|
||||
CONDITION ( QT_FEATURE_buttongroup ) AND ( QT_FEATURE_checkbox ) AND ( QT_FEATURE_combobox ) AND ( QT_FEATURE_dialog ) AND ( QT_FEATURE_datetimeedit ) AND ( QT_FEATURE_dialogbuttonbox ) AND ( QT_FEATURE_printer ) AND ( QT_FEATURE_radiobutton ) AND ( QT_FEATURE_spinbox ) AND ( QT_FEATURE_tabwidget ) AND ( QT_FEATURE_treeview )
|
||||
)
|
||||
qt_feature_definition("printdialog" "QT_NO_PRINTDIALOG" NEGATE VALUE "1")
|
||||
qt_feature("printpreviewdialog" PUBLIC
|
||||
SECTION "Dialogs"
|
||||
LABEL "QPrintPreviewDialog"
|
||||
PURPOSE "Provides a dialog for previewing and configuring page layouts for printer output."
|
||||
CONDITION QT_FEATURE_printpreviewwidget AND QT_FEATURE_printdialog AND QT_FEATURE_toolbar AND QT_FEATURE_formlayout
|
||||
)
|
||||
qt_feature_definition("printpreviewdialog" "QT_NO_PRINTPREVIEWDIALOG" NEGATE VALUE "1")
|
5
tests/auto/printsupport/CMakeLists.txt
Normal file
5
tests/auto/printsupport/CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
||||
# Generated from printsupport.pro.
|
||||
|
||||
qt_pull_features_into_current_scope(PUBLIC_FEATURES Qt::PrintSupport)
|
||||
add_subdirectory(dialogs)
|
||||
add_subdirectory(kernel)
|
3
tests/auto/printsupport/dialogs/CMakeLists.txt
Normal file
3
tests/auto/printsupport/dialogs/CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
||||
# Generated from dialogs.pro.
|
||||
|
||||
add_subdirectory(qabstractprintdialog)
|
@ -0,0 +1,13 @@
|
||||
# Generated from qabstractprintdialog.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qabstractprintdialog Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qabstractprintdialog
|
||||
SOURCES
|
||||
tst_qabstractprintdialog.cpp
|
||||
LIBRARIES
|
||||
Qt::Widgets
|
||||
Qt::PrintSupport
|
||||
)
|
5
tests/auto/printsupport/kernel/CMakeLists.txt
Normal file
5
tests/auto/printsupport/kernel/CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
||||
# Generated from kernel.pro.
|
||||
|
||||
add_subdirectory(qprintdevice)
|
||||
add_subdirectory(qprinter)
|
||||
add_subdirectory(qprinterinfo)
|
14
tests/auto/printsupport/kernel/qprintdevice/CMakeLists.txt
Normal file
14
tests/auto/printsupport/kernel/qprintdevice/CMakeLists.txt
Normal file
@ -0,0 +1,14 @@
|
||||
# Generated from qprintdevice.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qprintdevice Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qprintdevice
|
||||
SOURCES
|
||||
tst_qprintdevice.cpp
|
||||
DEFINES
|
||||
QT_USE_USING_NAMESPACE
|
||||
LIBRARIES
|
||||
Qt::PrintSupportPrivate
|
||||
)
|
13
tests/auto/printsupport/kernel/qprinter/CMakeLists.txt
Normal file
13
tests/auto/printsupport/kernel/qprinter/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
||||
# Generated from qprinter.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qprinter Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qprinter
|
||||
SOURCES
|
||||
tst_qprinter.cpp
|
||||
LIBRARIES
|
||||
Qt::PrintSupport
|
||||
Qt::Widgets
|
||||
)
|
14
tests/auto/printsupport/kernel/qprinterinfo/CMakeLists.txt
Normal file
14
tests/auto/printsupport/kernel/qprinterinfo/CMakeLists.txt
Normal file
@ -0,0 +1,14 @@
|
||||
# Generated from qprinterinfo.pro.
|
||||
|
||||
#####################################################################
|
||||
## tst_qprinterinfo Test:
|
||||
#####################################################################
|
||||
|
||||
add_qt_test(tst_qprinterinfo
|
||||
SOURCES
|
||||
tst_qprinterinfo.cpp
|
||||
DEFINES
|
||||
QT_USE_USING_NAMESPACE
|
||||
LIBRARIES
|
||||
Qt::PrintSupport
|
||||
)
|
Loading…
Reference in New Issue
Block a user