1sdbuspp_prog = find_program('sdbus++') 2 3domain = 'xyz.openbmc_project.Ipmi.Internal.SoftPowerOff' 4if_yaml_file = files('../SoftPowerOff.interface.yaml') 5 6if_cpp = custom_target( 7 'server.cpp', 8 output: 'server.cpp', 9 input: if_yaml_file, 10 capture: true, 11 command: [sdbuspp_prog, '-r', root, 'interface', 'server-cpp', domain]) 12 13if_hpp = custom_target( 14 'server.hpp', 15 output: 'server.hpp', 16 input: if_yaml_file, 17 capture: true, 18 command: [sdbuspp_prog, '-r', root, 'interface', 'server-header', domain], 19 install: true, 20 install_dir: get_option('includedir') / 'xyz/openbmc_project/Ipmi/Internal/SoftPowerOff') 21 22softoff_dbus_deps = [ 23 dependency('phosphor-dbus-interfaces'), 24 dependency('sdbusplus'), 25] 26 27softoff_dbus_lib = library( 28 'softoff-dbus', 29 [ 30 if_cpp, 31 if_hpp, 32 ], 33 implicit_include_directories: false, 34 include_directories: root_inc, 35 version: meson.project_version(), 36 dependencies: softoff_dbus_deps, 37 override_options: ['b_lundef=false'], 38 install: true) 39 40softoff_dbus = declare_dependency( 41 dependencies: softoff_dbus_deps, 42 sources: [if_hpp], 43 link_with: softoff_dbus_lib) 44 45softoff_dbus_reqs = [] 46foreach dep : softoff_dbus_deps 47 if dep.type_name() == 'pkgconfig' 48 softoff_dbus_reqs += dep 49 endif 50endforeach 51 52import('pkgconfig').generate( 53 name: 'softoff-dbus', 54 description: 'SoftPowerOff DBus Bindings', 55 version: meson.project_version(), 56 libraries: softoff_dbus, 57 requires: softoff_dbus_reqs) 58