diff --git a/libfprint/meson.build b/libfprint/meson.build index 66c4c74..3838e93 100644 --- a/libfprint/meson.build +++ b/libfprint/meson.build @@ -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 ' +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, diff --git a/meson.build b/meson.build index cbeab4d..8e392e4 100644 --- a/meson.build +++ b/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 ' -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')