meson: Move source generation into libfprint meson file
This commit is contained in:
parent
798bc4ee1e
commit
e59d5451cc
2 changed files with 22 additions and 22 deletions
|
@ -207,6 +207,28 @@ enums_dep = declare_dependency(
|
|||
sources: [ fp_enums_h, fpi_enums_h ]
|
||||
)
|
||||
|
||||
# Export the drivers' types to the core code
|
||||
drivers_type_list = []
|
||||
drivers_type_func = []
|
||||
drivers_type_list += '#include <glib-object.h>'
|
||||
drivers_type_list += '#include "fpi-context.h"'
|
||||
drivers_type_list += ''
|
||||
drivers_type_func += 'GArray *'
|
||||
drivers_type_func += 'fpi_get_driver_types (void)'
|
||||
drivers_type_func += '{'
|
||||
drivers_type_func += ' GArray *drivers = g_array_new (TRUE, FALSE, sizeof (GType));'
|
||||
drivers_type_func += ' GType t;'
|
||||
drivers_type_func += ''
|
||||
foreach driver: supported_drivers
|
||||
drivers_type_list += 'extern GType (fpi_device_' + driver + '_get_type) (void);'
|
||||
drivers_type_func += ' t = fpi_device_' + driver + '_get_type ();'
|
||||
drivers_type_func += ' g_array_append_val (drivers, t);'
|
||||
drivers_type_func += ''
|
||||
endforeach
|
||||
drivers_type_list += ''
|
||||
drivers_type_func += ' return drivers;'
|
||||
drivers_type_func += '}'
|
||||
|
||||
drivers_sources += configure_file(input: 'empty_file',
|
||||
output: 'fpi-drivers.c',
|
||||
capture: true,
|
||||
|
|
22
meson.build
22
meson.build
|
@ -188,28 +188,6 @@ if default_drivers_are_enabled and supported_drivers != drivers
|
|||
default_drivers_are_enabled = false
|
||||
endif
|
||||
|
||||
# Export the drivers' types to the core code
|
||||
drivers_type_list = []
|
||||
drivers_type_func = []
|
||||
drivers_type_list += '#include <glib-object.h>'
|
||||
drivers_type_list += '#include "fpi-context.h"'
|
||||
drivers_type_list += ''
|
||||
drivers_type_func += 'GArray *'
|
||||
drivers_type_func += 'fpi_get_driver_types (void)'
|
||||
drivers_type_func += '{'
|
||||
drivers_type_func += ' GArray *drivers = g_array_new (TRUE, FALSE, sizeof (GType));'
|
||||
drivers_type_func += ' GType t;'
|
||||
drivers_type_func += ''
|
||||
foreach driver: supported_drivers
|
||||
drivers_type_list += 'extern GType (fpi_device_' + driver + '_get_type) (void);'
|
||||
drivers_type_func += ' t = fpi_device_' + driver + '_get_type ();'
|
||||
drivers_type_func += ' g_array_append_val (drivers, t);'
|
||||
drivers_type_func += ''
|
||||
endforeach
|
||||
drivers_type_list += ''
|
||||
drivers_type_func += ' return drivers;'
|
||||
drivers_type_func += '}'
|
||||
|
||||
root_inc = include_directories('.')
|
||||
|
||||
if get_option('udev_rules')
|
||||
|
|
Loading…
Reference in a new issue