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) 13 14if_hpp = custom_target( 15 'server.hpp', 16 output: 'server.hpp', 17 input: if_yaml_file, 18 capture: true, 19 command: [sdbuspp_prog, '-r', root, 'interface', 'server-header', domain], 20 install: true, 21 install_dir: get_option('includedir') / 'xyz/openbmc_project/Ipmi/Internal/SoftPowerOff', 22) 23 24if_common_hpp = custom_target( 25 'common.hpp', 26 output: 'common.hpp', 27 input: if_yaml_file, 28 capture: true, 29 command: [sdbuspp_prog, '-r', root, 'interface', 'common-header', domain], 30 install: true, 31 install_dir: get_option('includedir') / 'xyz/openbmc_project/Ipmi/Internal/SoftPowerOff', 32) 33 34softoff_dbus_deps = [ 35 dependency('phosphor-dbus-interfaces'), 36 dependency('sdbusplus'), 37] 38 39softoff_dbus_lib = library( 40 'softoff-dbus', 41 [if_cpp, if_hpp, if_common_hpp], 42 implicit_include_directories: false, 43 include_directories: root_inc, 44 version: meson.project_version(), 45 dependencies: softoff_dbus_deps, 46 override_options: ['b_lundef=false'], 47 install: true, 48) 49 50softoff_dbus = declare_dependency( 51 dependencies: softoff_dbus_deps, 52 sources: [if_hpp, if_common_hpp], 53 link_with: softoff_dbus_lib, 54) 55 56softoff_dbus_reqs = [] 57foreach dep : softoff_dbus_deps 58 if dep.type_name() == 'pkgconfig' 59 softoff_dbus_reqs += dep 60 endif 61endforeach 62 63import('pkgconfig').generate( 64 name: 'softoff-dbus', 65 description: 'SoftPowerOff DBus Bindings', 66 version: meson.project_version(), 67 libraries: softoff_dbus, 68 requires: softoff_dbus_reqs, 69) 70