blob: fdd2a84e76931dd814e66ce9efa14b04c98950ec [file] [log] [blame]
domain = 'xyz.openbmc_project.Control.Hoth'
if_yaml_file = files('../../../../yaml/xyz/openbmc_project/Control/Hoth.interface.yaml')
error_yaml_file = files('../../../../yaml/xyz/openbmc_project/Control/Hoth.errors.yaml')
sdbuspp_gen_meson_prog = find_program('sdbus++-gen-meson', native: true)
generated_hpp = []
generated_cpp = []
generated_hpp += custom_target(
'xyz/openbmc_project/Control/Hoth__hpp'.underscorify(),
input: [if_yaml_file, error_yaml_file],
output: [ 'common.hpp', 'server.hpp', 'error.hpp' ],
command: [
sdbuspp_gen_meson_prog, '--command', 'cpp',
'--output', meson.current_build_dir(),
'--tool', sdbusplusplus_prog,
'--directory', hothd_root + '/yaml',
'xyz/openbmc_project/Control/Hoth',
],
install: true,
install_dir: get_option('includedir') + '/xyz/openbmc_project/Control/Hoth/',
)
generated_cpp += custom_target(
'xyz/openbmc_project/Control/Hoth__cpp'.underscorify(),
input: [if_yaml_file, error_yaml_file],
output: [ 'server.cpp', 'error.cpp' ],
command: [
sdbuspp_gen_meson_prog, '--command', 'cpp',
'--output', meson.current_build_dir(),
'--tool', sdbusplusplus_prog,
'--directory', hothd_root + '/yaml',
'xyz/openbmc_project/Control/Hoth',
],
)
subdir('State')
hothd_dbus_deps = [
dependency(
'phosphor-dbus-interfaces',
fallback: ['phosphor-dbus-interfaces', 'phosphor_dbus_interfaces_dep']),
sdbusplus_dep
]
hothd_dbus_lib = library(
'hothd-dbus',
generated_hpp + generated_cpp,
implicit_include_directories: false,
include_directories: hothd_headers,
version: meson.project_version(),
dependencies: hothd_dbus_deps,
install: true)
hothd_dbus_dep = declare_dependency(
dependencies: hothd_dbus_deps,
sources: generated_hpp + generated_cpp,
link_with: hothd_dbus_lib)
hothd_dbus_reqs = []
foreach dep : hothd_dbus_deps
if dep.type_name() == 'pkgconfig'
hothd_dbus_reqs += dep
endif
endforeach
import('pkgconfig').generate(
hothd_dbus_lib,
description: 'Hothd DBus Bindings',
version: meson.project_version(),
requires: hothd_dbus_reqs)