2020-10-17 13:50:40 +00:00
|
|
|
print_backends = []
|
2017-03-22 16:48:56 +00:00
|
|
|
|
|
|
|
printbackends_subdir = 'gtk-4.0/@0@/printbackends'.format(gtk_binary_version)
|
|
|
|
printbackends_install_dir = join_paths(get_option('libdir'), printbackends_subdir)
|
2021-01-29 23:46:32 +00:00
|
|
|
gio_module_dirs += printbackends_install_dir
|
2017-03-22 16:48:56 +00:00
|
|
|
|
2018-03-12 10:02:24 +00:00
|
|
|
printbackends_args = [
|
|
|
|
'-DGTK_COMPILATION',
|
|
|
|
'-DGTK_DISABLE_DEPRECATION_WARNINGS',
|
|
|
|
'-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED',
|
2020-05-18 09:38:02 +00:00
|
|
|
] + common_cflags
|
2018-03-12 10:02:24 +00:00
|
|
|
|
2020-10-17 13:50:40 +00:00
|
|
|
cups_dep = dependency('cups', version : '>=2.0', required: get_option('print-cups'))
|
|
|
|
if cups_dep.found()
|
|
|
|
print_backends += 'cups'
|
2018-03-11 16:18:16 +00:00
|
|
|
shared_module('printbackend-cups',
|
2020-12-15 12:31:38 +00:00
|
|
|
sources: [
|
|
|
|
'gtkprintbackendcups.c',
|
|
|
|
'gtkprintercups.c',
|
|
|
|
'gtkcupsutils.c',
|
|
|
|
'gtkcupssecretsutils.c',
|
|
|
|
],
|
|
|
|
c_args: printbackends_args,
|
|
|
|
dependencies: [libgtk_dep, cups_dep, colord_dep],
|
2021-02-05 21:56:14 +00:00
|
|
|
name_suffix: module_suffix,
|
2020-12-15 12:31:38 +00:00
|
|
|
install_dir: printbackends_install_dir,
|
|
|
|
install: true,
|
|
|
|
)
|
2020-10-17 13:50:40 +00:00
|
|
|
else
|
|
|
|
# Automatic fall-back to the lpr backend
|
|
|
|
print_backends += 'lpr'
|
|
|
|
shared_module('printbackend-lpr',
|
2020-12-15 12:31:38 +00:00
|
|
|
sources: 'gtkprintbackendlpr.c',
|
|
|
|
c_args: printbackends_args,
|
|
|
|
dependencies: libgtk_dep,
|
2021-02-05 21:56:14 +00:00
|
|
|
name_suffix: module_suffix,
|
2020-12-15 12:31:38 +00:00
|
|
|
install_dir: printbackends_install_dir,
|
|
|
|
install: true,
|
|
|
|
)
|
2018-03-11 16:18:16 +00:00
|
|
|
endif
|
|
|
|
|
2020-10-17 13:50:40 +00:00
|
|
|
# The 'file' print backend cannot be disabled
|
|
|
|
print_backends += 'file'
|
|
|
|
shared_module('printbackend-file',
|
2020-12-15 12:31:38 +00:00
|
|
|
sources: 'gtkprintbackendfile.c',
|
|
|
|
c_args: printbackends_args,
|
|
|
|
dependencies: libgtk_dep,
|
2021-02-05 21:56:14 +00:00
|
|
|
name_suffix: module_suffix,
|
2020-12-15 12:31:38 +00:00
|
|
|
install_dir: printbackends_install_dir,
|
|
|
|
install: true,
|
|
|
|
)
|
2020-12-21 19:10:03 +00:00
|
|
|
|
|
|
|
cdata.set_quoted('GTK_PRINT_BACKENDS', ','.join(print_backends))
|