--- a/meson.build
+++ b/meson.build
@@ -530,8 +530,7 @@
     gio = not_found
   endif
   if gio.found()
-    gdbus_codegen = find_program(gio.get_variable('gdbus_codegen'),
-                                 required: get_option('gio'))
+    gdbus_codegen = find_program('gdbus-codegen')
     gio_unix = dependency('gio-unix-2.0', required: get_option('gio'),
                           method: 'pkg-config', kwargs: static_kwargs)
     gio = declare_dependency(dependencies: [gio, gio_unix],
