diff --git a/libfprint/meson.build b/libfprint/meson.build index fa46f7d..55ecb46 100644 --- a/libfprint/meson.build +++ b/libfprint/meson.build @@ -220,6 +220,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 f23354d..d76055a 100644 --- a/meson.build +++ b/meson.build @@ -229,28 +229,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('.') udev_hwdb = get_option('udev_hwdb')