diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2018-03-23 21:20:23 +0100 |
---|---|---|
committer | Iñigo Martínez <inigomartinez@gmail.com> | 2018-03-26 22:45:20 +0200 |
commit | 06c28a632d738b0141b619ea1c500d2563a20298 (patch) | |
tree | e550e4f269719f159df6e50efdbd5fa875ac5ec9 /metadata | |
parent | f2163d2daf55f950e63df7dd8bf2b991dd1afa71 (diff) | |
download | gvfs-06c28a632d738b0141b619ea1c500d2563a20298.tar.gz |
build: Apply a workaround for D-Bus code generation
meson uses `gdbus-codegen` for D-Bus code generation. However, both
files are generated implicitly, so meson is not able to know how
many files are generated, so it does generate only one opaque
target that represents the two files.
A new script has been created only to call `gdbus-codegen` and
simulate the generation of the source code and header as different
targets.
Please see:
https://bugzilla.gnome.org/show_bug.cgi?id=791015
https://github.com/mesonbuild/meson/pull/2930
https://bugzilla.gnome.org/show_bug.cgi?id=794365
Diffstat (limited to 'metadata')
-rw-r--r-- | metadata/meson.build | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/metadata/meson.build b/metadata/meson.build index 4d47850b..9eac0766 100644 --- a/metadata/meson.build +++ b/metadata/meson.build @@ -29,11 +29,16 @@ metadata_service = configure_file( configuration: dbus_service_conf ) -metadata_dbus = gnome.gdbus_codegen( - 'metadata-dbus', - 'dbus-interface.xml', - interface_prefix: gvfs_namespace + '.', - namespace: 'GVfs' +# FIXME: Ugly workaround that simulates the generation of +# two different targets. +namespace = 'GVfs' +name = 'metadata-dbus' + +dbus_sources = custom_target( + name, + input: 'dbus-interface.xml', + output: [name + '.c', name + '.h'], + command: [codegen, gvfs_namespace + '.', name, namespace, meson.current_build_dir(), '@INPUT@', '@OUTPUT@'] ) sources = files( @@ -50,7 +55,7 @@ cflags = [ libmetadata = static_library( 'metadata', - sources: sources + [metadata_dbus], + sources: sources + [dbus_sources], include_directories: [top_inc, common_inc], dependencies: glib_deps, c_args: cflags, @@ -58,7 +63,7 @@ libmetadata = static_library( ) libmetadata_dep = declare_dependency( - sources: metadata_dbus, + sources: dbus_sources[1], link_with: libmetadata, include_directories: include_directories('.'), dependencies: glib_deps |