build: create pkgconfig var for yaml output
Some packages that depend on phosphor-dbus-interfaces try to
re-process the YAML for their own purposes. Add variables to
pkgconfig and subproject-dependency so that those users can
determine where the YAML is at. For pkgconfig it is in the
install path and for subproject's it is at the source-root.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I222b4394a22b45fe493ac13b9d50538dc0349bbb
diff --git a/meson.build b/meson.build
index 5873bf0..99d02fc 100644
--- a/meson.build
+++ b/meson.build
@@ -38,10 +38,11 @@
endif
# Install the selected YAML files.
+inst_yaml_dir = get_option('datadir') / 'phosphor-dbus-yaml/yaml'
foreach d : selected_subdirs
install_subdir(
d,
- install_dir: get_option('datadir') / 'phosphor-dbus-yaml/yaml' / d,
+ install_dir: inst_yaml_dir / d,
strip_directory: true,
)
endforeach
@@ -116,11 +117,13 @@
libphosphor_dbus,
name: meson.project_name(),
version: meson.project_version(),
- description: 'Generated sdbusplus bindings for phosphor-dbus-interfaces'
+ description: 'Generated sdbusplus bindings for phosphor-dbus-interfaces',
+ variables: ['yamldir=' + inst_yaml_dir],
)
phosphor_dbus_interfaces_dep = declare_dependency(
include_directories: include_directories('gen'),
link_with: libphosphor_dbus,
- dependencies: sdbusplus_dep
+ dependencies: sdbusplus_dep,
+ variables: ['yamldir=' + meson.project_source_root()],
)