mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 21:51:08 +00:00
af15f5d004
This service was shut down at the start of 2021. This helpfully removes any dependency on json-glib, librest (and libsoup).
55 lines
1.5 KiB
Meson
55 lines
1.5 KiB
Meson
print_backends = []
|
|
|
|
printbackends_subdir = 'gtk-4.0/@0@/printbackends'.format(gtk_binary_version)
|
|
printbackends_install_dir = join_paths(get_option('libdir'), printbackends_subdir)
|
|
gio_module_dirs += printbackends_install_dir
|
|
|
|
printbackends_args = [
|
|
'-DGTK_COMPILATION',
|
|
'-DGTK_DISABLE_DEPRECATION_WARNINGS',
|
|
'-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED',
|
|
'-D_GLIB_EXTERN=@0@'.format(visibility_define),
|
|
] + common_cflags
|
|
|
|
cups_dep = dependency('cups', version : '>=2.0', required: get_option('print-cups'))
|
|
if cups_dep.found()
|
|
print_backends += 'cups'
|
|
shared_module('printbackend-cups',
|
|
sources: [
|
|
'gtkprintbackendcups.c',
|
|
'gtkprintercups.c',
|
|
'gtkcupsutils.c',
|
|
'gtkcupssecretsutils.c',
|
|
],
|
|
c_args: printbackends_args,
|
|
dependencies: [libgtk_dep, cups_dep, colord_dep],
|
|
name_suffix: module_suffix,
|
|
install_dir: printbackends_install_dir,
|
|
install: true,
|
|
)
|
|
else
|
|
# Automatic fall-back to the lpr backend
|
|
print_backends += 'lpr'
|
|
shared_module('printbackend-lpr',
|
|
sources: 'gtkprintbackendlpr.c',
|
|
c_args: printbackends_args,
|
|
dependencies: libgtk_dep,
|
|
name_suffix: module_suffix,
|
|
install_dir: printbackends_install_dir,
|
|
install: true,
|
|
)
|
|
endif
|
|
|
|
# The 'file' print backend cannot be disabled
|
|
print_backends += 'file'
|
|
shared_module('printbackend-file',
|
|
sources: 'gtkprintbackendfile.c',
|
|
c_args: printbackends_args,
|
|
dependencies: libgtk_dep,
|
|
name_suffix: module_suffix,
|
|
install_dir: printbackends_install_dir,
|
|
install: true,
|
|
)
|
|
|
|
cdata.set_quoted('GTK_PRINT_BACKENDS', ','.join(print_backends))
|