Consolidate print backends into one directory

This will let us use GTK_PATH to load them uninstalled, which
is useful for in-tree tests.
This commit is contained in:
Matthias Clasen 2018-03-11 12:18:16 -04:00
parent da8e83f9cb
commit a78e9f2261
23 changed files with 65 additions and 56 deletions

View File

@ -1,11 +0,0 @@
shared_module('printbackend-cloudprint',
'gtkprintbackendcloudprint.c',
'gtkprintercloudprint.c',
'gtkcloudprintaccount.c',
c_args: [
'-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED',
'-DGTK_DISABLE_DEPRECATION_WARNINGS',
],
dependencies: [ libgtk_dep, rest_dep, json_glib_dep ],
install_dir: printbackends_install_dir,
install : true)

View File

@ -1,22 +0,0 @@
enable_colord = get_option('colord')
if enable_colord != 'no'
want_colord = enable_colord == 'yes'
colord_dep = dependency('colord', version: '>= 0.1.9', required: want_colord)
cdata.set('HAVE_COLORD', colord_dep.found())
else
colord_dep = []
endif
shared_module('printbackend-cups',
'gtkprintbackendcups.c',
'gtkprintercups.c',
'gtkcupsutils.c',
'gtkcupssecretsutils.c',
c_args: [
'-DGTK_COMPILATION',
'-DGTK_DISABLE_DEPRECATION_WARNINGS',
'-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED',
],
dependencies: [libgtk_dep, libcups, colord_dep],
install_dir: printbackends_install_dir,
install : true)

View File

@ -1,10 +0,0 @@
shared_module('printbackend-file',
'gtkprintbackendfile.c',
c_args: [
'-DGTK_COMPILATION',
'-DGTK_DISABLE_DEPRECATION_WARNINGS',
'-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED',
],
dependencies: libgtk_dep,
install_dir: printbackends_install_dir,
install : true)

View File

@ -1,10 +0,0 @@
shared_module('printbackend-lpr',
'gtkprintbackendlpr.c',
c_args: [
'-DGTK_COMPILATION',
'-DGTK_DISABLE_DEPRECATION_WARNINGS',
'-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED',
],
dependencies: libgtk_dep,
install_dir: printbackends_install_dir,
install : true)

View File

@ -84,6 +84,68 @@ printbackends_install_dir = join_paths(get_option('libdir'), printbackends_subdi
cdata.set_quoted('GTK_PRINT_BACKENDS', ','.join(print_backends))
foreach print_backend : print_backends
subdir(print_backend)
endforeach
enable_colord = get_option('colord')
if enable_colord != 'no'
want_colord = enable_colord == 'yes'
colord_dep = dependency('colord', version: '>= 0.1.9', required: want_colord)
cdata.set('HAVE_COLORD', colord_dep.found())
else
colord_dep = []
endif
if print_backends.contains('cups')
shared_module('printbackend-cups',
'gtkprintbackendcups.c',
'gtkprintercups.c',
'gtkcupsutils.c',
'gtkcupssecretsutils.c',
c_args: [
'-DGTK_COMPILATION',
'-DGTK_DISABLE_DEPRECATION_WARNINGS',
'-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED',
],
dependencies: [libgtk_dep, libcups, colord_dep],
install_dir: printbackends_install_dir,
install : true)
endif
if print_backends.contains('cloudprint')
shared_module('printbackend-cloudprint',
'gtkprintbackendcloudprint.c',
'gtkprintercloudprint.c',
'gtkcloudprintaccount.c',
c_args: [
'-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED',
'-DGTK_DISABLE_DEPRECATION_WARNINGS',
],
dependencies: [ libgtk_dep, rest_dep, json_glib_dep ],
install_dir: printbackends_install_dir,
install : true)
endif
if print_backends.contains('file')
shared_module('printbackend-file',
'gtkprintbackendfile.c',
c_args: [
'-DGTK_COMPILATION',
'-DGTK_DISABLE_DEPRECATION_WARNINGS',
'-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED',
],
dependencies: libgtk_dep,
install_dir: printbackends_install_dir,
install : true)
endif
if print_backends.contains('lpr')
shared_module('printbackend-lpr',
'gtkprintbackendlpr.c',
c_args: [
'-DGTK_COMPILATION',
'-DGTK_DISABLE_DEPRECATION_WARNINGS',
'-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED',
],
dependencies: libgtk_dep,
install_dir: printbackends_install_dir,
install : true)
endif