summaryrefslogtreecommitdiff
path: root/introspection
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2018-09-23 16:30:18 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2018-09-28 17:25:46 +0200
commitdcfddeef7a7af537f3d271e94d2170ad0d28e39f (patch)
treec44ae0ffec22d6b62986c3fe5aec39f5d4e0bf2b /introspection
parent929298333e1f34fcd519593897f16823d45be65a (diff)
downloadNetworkManager-dcfddeef7a7af537f3d271e94d2170ad0d28e39f.tar.gz
build: meson: fix generation of api docs
We need to copy all introspection files to the same directory when building the documentation. Note that we only require Meson 0.44, but for the documentation at least 0.46 is needed because of a new functionality of gnome.gdbus_codegen(). In this way we can still build on Travis CI (without documentation).
Diffstat (limited to 'introspection')
-rw-r--r--introspection/meson.build12
1 files changed, 10 insertions, 2 deletions
diff --git a/introspection/meson.build b/introspection/meson.build
index a554083684..35d8c87c42 100644
--- a/introspection/meson.build
+++ b/introspection/meson.build
@@ -53,6 +53,7 @@ ifaces = [
ifaces_xmls = []
sources = []
+introspection_files = []
# FIXME?: DBUS_INTERFACE_DOCS/docbook files are generated in
# "meson.current_build_dir()" instead of "meson.source_root()/docs/api"
@@ -60,7 +61,7 @@ foreach iface: ifaces
iface_xml = iface + '.xml'
ifaces_xmls += files(iface_xml)
- sources += gnome.gdbus_codegen(
+ res = gnome.gdbus_codegen(
iface,
iface_xml,
interface_prefix: 'org.freedesktop.NetworkManager',
@@ -68,8 +69,15 @@ foreach iface: ifaces
docbook: 'dbus'
)
- # FIXME: gnome.gdbus_codegen should return the docbook as a target result
+ sources += res
+
content_files += join_paths(meson.current_build_dir(), 'dbus-' + iface_xml)
+
+ # res is an array only since 0.46. Documentation won't work with
+ # older versions
+ if meson.version().version_compare('>= 0.46.0')
+ introspection_files += res[2]
+ endif
endforeach
install_data(