meson: Move source generation into libfprint meson file
This commit is contained in:
parent
e8f9cc1fce
commit
d2c2410a6f
2 changed files with 22 additions and 22 deletions
|
@ -220,6 +220,28 @@ enums_dep = declare_dependency(
|
||||||
sources: [ fp_enums_h, fpi_enums_h ]
|
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',
|
drivers_sources += configure_file(input: 'empty_file',
|
||||||
output: 'fpi-drivers.c',
|
output: 'fpi-drivers.c',
|
||||||
capture: true,
|
capture: true,
|
||||||
|
|
22
meson.build
22
meson.build
|
@ -229,28 +229,6 @@ if default_drivers_are_enabled and supported_drivers != drivers
|
||||||
default_drivers_are_enabled = false
|
default_drivers_are_enabled = false
|
||||||
endif
|
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('.')
|
root_inc = include_directories('.')
|
||||||
|
|
||||||
udev_hwdb = get_option('udev_hwdb')
|
udev_hwdb = get_option('udev_hwdb')
|
||||||
|
|
Loading…
Reference in a new issue