meson.build: change set10 to set

Follow-up to cfec80582e ("meson.build: change from config.set10() and #if to config.set() and #ifdef")
which was parallel to 9e37bc0cfa and the latter didn't get updated.

Fixes: 9e37bc0cfa ("plugins: add support for lua plugins to change evdev event streams")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1347>
This commit is contained in:
Peter Hutterer 2025-10-27 11:35:32 +10:00 committed by Marge Bot
parent 07659db3d9
commit f27fbdfa53
2 changed files with 10 additions and 6 deletions

View file

@ -171,10 +171,14 @@ dep_rt = cc.find_library('rt', required : false)
dep_lua = dependency(get_option('lua-interpreter'), dep_lua = dependency(get_option('lua-interpreter'),
required : get_option('lua-plugins')) required : get_option('lua-plugins'))
have_lua = dep_lua.found() have_lua = dep_lua.found()
config_h.set10('HAVE_LUA', have_lua) if have_lua
config_h.set('HAVE_LUA', 1)
endif
have_plugins = dep_lua.found() have_plugins = dep_lua.found()
config_h.set10('HAVE_PLUGINS', have_plugins) if have_plugins
config_h.set('HAVE_PLUGINS', 1)
endif
summary({ summary({
'Plugins enabled' : have_plugins, 'Plugins enabled' : have_plugins,

View file

@ -382,7 +382,7 @@ libinput_plugin_system_load_plugins(struct libinput *libinput,
return 0; return 0;
} }
#if HAVE_LUA #ifdef HAVE_LUA
_autostrvfree_ char **directories = steal(&libinput->plugin_system.directories); _autostrvfree_ char **directories = steal(&libinput->plugin_system.directories);
size_t nfiles = 0; size_t nfiles = 0;
_autostrvfree_ char **plugin_files = _autostrvfree_ char **plugin_files =
@ -400,10 +400,10 @@ libinput_plugin_system_load_plugins(struct libinput *libinput,
libinput_plugin_system_run(&libinput->plugin_system); libinput_plugin_system_run(&libinput->plugin_system);
#if !HAVE_PLUGINS #ifdef HAVE_PLUGINS
return -ENOSYS;
#else
return 0; return 0;
#else
return -ENOSYS;
#endif #endif
} }