Replaced gnome.genmarshal() usage with explicit Meson custom_target() rules that generate both marshal.h and marshal.c from marshalers.list, preserving the same marshaller prefix and generated outputs consumed by the build.

Added a direct find_program() lookup for glib-genmarshal (with glib-genmarshal-2.0 fallback), so configuration no longer depends on the broken glib-2.0 pkg-config tool variable (glib_genmarshal) reported in your error.
This commit is contained in:
2026-02-23 10:50:53 -07:00
parent b2fd66e4c4
commit ab0e84257a

View File

@@ -55,12 +55,39 @@ if host_machine.system() == 'windows'
common_includes += include_directories('sysinfo')
endif
marshal = gnome.genmarshal('marshal',
sources: 'marshalers.list',
prefix: '_zoitechat_marshal',
internal: true
glib_genmarshal = find_program(
'glib-genmarshal',
'glib-genmarshal-2.0',
required: true,
)
marshal = [
custom_target('marshal_h',
input: 'marshalers.list',
output: 'marshal.h',
command: [
glib_genmarshal,
'--prefix=_zoitechat_marshal',
'--header',
'@INPUT@',
'--output',
'@OUTPUT@',
]
),
custom_target('marshal_c',
input: 'marshalers.list',
output: 'marshal.c',
command: [
glib_genmarshal,
'--prefix=_zoitechat_marshal',
'--body',
'@INPUT@',
'--output',
'@OUTPUT@',
]
)
]
make_te = find_program('make-te.py')
textevents = custom_target('textevents',