cmake: Find Cups and enable its plugin
Change-Id: I44bf176587331d86eb147d106f28deb0a6618ab4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
71c9db7da8
commit
3882e9ea09
@ -23,6 +23,6 @@ if (QT_FEATURE_widgets)
|
|||||||
# TODO add_subdirectory(styles)
|
# TODO add_subdirectory(styles)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT WINRT AND QT_FEATURE_printsupport)
|
if (NOT WINRT AND TARGET PrintSupport)
|
||||||
# TODO add_subdirectory(printsupport)
|
add_subdirectory(printsupport)
|
||||||
endif()
|
endif()
|
||||||
|
11
src/plugins/printsupport/CMakeLists.txt
Normal file
11
src/plugins/printsupport/CMakeLists.txt
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
if (APPLE_OSX)
|
||||||
|
# TODO add_subdirectory(cocoa)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
# TODO add_subdirectory(windows)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (UNIX AND NOT APPLE AND QT_FEATURE_cups)
|
||||||
|
add_subdirectory(cups)
|
||||||
|
endif()
|
28
src/plugins/printsupport/cups/CMakeLists.txt
Normal file
28
src/plugins/printsupport/cups/CMakeLists.txt
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Generated from cups.pro.
|
||||||
|
|
||||||
|
find_package(Cups)
|
||||||
|
|
||||||
|
#####################################################################
|
||||||
|
## cupsprintersupport Plugin:
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
|
add_qt_plugin(cupsprintersupport
|
||||||
|
TYPE printsupport
|
||||||
|
SOURCES
|
||||||
|
main.cpp
|
||||||
|
qcupsprintengine.cpp qcupsprintengine_p.h
|
||||||
|
qcupsprintersupport.cpp qcupsprintersupport_p.h
|
||||||
|
qppdprintdevice.cpp qppdprintdevice.h
|
||||||
|
INCLUDE_DIRECTORIES
|
||||||
|
../../../printsupport/kernel
|
||||||
|
LIBRARIES
|
||||||
|
Qt::CorePrivate
|
||||||
|
Qt::GuiPrivate
|
||||||
|
Qt::PrintSupport
|
||||||
|
Qt::PrintSupportPrivate
|
||||||
|
Cups::Cups
|
||||||
|
# MODULE = "cupsprintersupport"
|
||||||
|
# OTHER_FILES = "cups.json"
|
||||||
|
# PLUGIN_CLASS_NAME = "QCupsPrinterSupportPlugin"
|
||||||
|
# _LOADED = "qt_plugin"
|
||||||
|
)
|
@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
#### Libraries
|
#### Libraries
|
||||||
|
|
||||||
|
find_package(Cups)
|
||||||
|
set_package_properties(Cups PROPERTIES TYPE OPTIONAL)
|
||||||
|
|
||||||
|
|
||||||
#### Tests
|
#### Tests
|
||||||
@ -18,7 +20,7 @@ qt_feature("cups" PUBLIC PRIVATE
|
|||||||
SECTION "Painting"
|
SECTION "Painting"
|
||||||
LABEL "CUPS"
|
LABEL "CUPS"
|
||||||
PURPOSE "Provides support for the Common Unix Printing System."
|
PURPOSE "Provides support for the Common Unix Printing System."
|
||||||
CONDITION libs.cups AND QT_FEATURE_printer AND QT_FEATURE_datestring OR FIXME
|
CONDITION Cups_FOUND AND QT_FEATURE_printer AND QT_FEATURE_datestring
|
||||||
)
|
)
|
||||||
qt_feature_definition("cups" "QT_NO_CUPS" NEGATE VALUE "1")
|
qt_feature_definition("cups" "QT_NO_CUPS" NEGATE VALUE "1")
|
||||||
qt_feature("cupsjobwidget" PUBLIC PRIVATE
|
qt_feature("cupsjobwidget" PUBLIC PRIVATE
|
||||||
|
@ -49,6 +49,7 @@ def map_library(lib: str) -> Union[str, LibraryMapping, List[str]]:
|
|||||||
libmap = {
|
libmap = {
|
||||||
'atspi': 'ATSPI2',
|
'atspi': 'ATSPI2',
|
||||||
'corewlan': None, # Framework
|
'corewlan': None, # Framework
|
||||||
|
'cups': 'Cups',
|
||||||
'double-conversion': 'WrapDoubleConversion',
|
'double-conversion': 'WrapDoubleConversion',
|
||||||
'drm': 'Libdrm',
|
'drm': 'Libdrm',
|
||||||
'egl': LibraryMapping(package="OpenGL", resultVariable="OpenGL_EGL"),
|
'egl': LibraryMapping(package="OpenGL", resultVariable="OpenGL_EGL"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user