plugins = [ 'roof-read', 'roof-build', ] roof_common_src = [ 'ufo-roof-config.c', ] roof_plugin_src = { 'roof-read': [ 'ufo-roof-read-socket.c', 'ufo-roof-read-file.c', ], 'roof-build': [ 'ufo-roof-buffer.c', ], } # standard plugins foreach plugin: plugins name = ''.join(plugin.split('-')) sources = roof_common_src + [ 'ufo-@0@-task.c'.format(plugin), ] if plugin in roof_plugin_src sources += roof_plugin_src[plugin] endif shared_module(name, 'ufo-@0@-task.c'.format(plugin), dependencies: deps, name_prefix: 'libufofilter', install: true, install_dir: plugin_install_dir, sources: sources ) endforeach subdir('kernels')