Trying to use dbus binding tool in meson build.

97 views
Skip to first unread message

Varahalu Naidu

unread,
Aug 28, 2018, 10:08:44 AM8/28/18
to The Meson Build System

Hi All,


I am migrating my project from auto tools to meson build system, we have a requirement to generate the marshal files on target on build time.
we were able to generate marshal files using auto tools as below. 


project_dbus_marshal.h: project_dbus_marshal.list
$(AM_V_GEN)$(GLIB_GENMARSHAL) $< --prefix=project_dbus_marshal --header > $@

project_dbus_marshal.c: project_dbus_marshal.list
$(AM_V_GEN)echo "#include \"project_dbus_marshal.h\"" > $@ && \

$(GLIB_GENMARSHAL) $< --prefix=project_dbus_marshal --body >> $@


project_native_server.h: project_native.xml
$(AM_V_GEN)$(DBUSBINDINGTOOL) --mode=glib-server --output=$@ --prefix=project_native $^

project_native_client.h: project_native.xml
$(AM_V_GEN)$(DBUSBINDINGTOOL) --mode=glib-client --output=$@ --prefix=project_native $^


we are not able to generate marshal file with using meson.build, i tried as below.

i18n = import('i18n')

add_project_arguments('-DGETTEXT_PACKAGE=' , language: 'c')

i18n.merge_file(
  input: 'project_dbus_marshal.list',
  output: 'project_dbus_marshal.h',
  type: 'desktop',
  po_dir: 'src',
  install: true,
  install_dir: join_paths(get_option('datadir'), 'applications')
)


could you please help anyone this. 

Jussi Pakkanen

unread,
Aug 28, 2018, 11:46:44 AM8/28/18
to varaha...@gmail.com, The Meson Build System
On Tue, Aug 28, 2018 at 5:08 PM Varahalu Naidu <varaha...@gmail.com> wrote:

> I am migrating my project from auto tools to meson build system, we have a requirement to generate the marshal files on target on build time.
> we were able to generate marshal files using auto tools as below.

> i18n = import('i18n')
>
> i18n.merge_file(

If you are trying to generate marshal files, why are you not using the
builtin functionality of the gnome module:

https://mesonbuild.com/Gnome-module.html#gnomegenmarshal
Reply all
Reply to author
Forward
0 new messages