xref: /openbmc/phosphor-bmc-code-mgmt/i2c-vr/meson.build (revision 26d374835b84adac8a47c8c857aafbb7f894a785)
17e446a40SChristopher Meisi2cvr_src = files('i2cvr_device.cpp', 'i2cvr_software_manager.cpp', 'vr.cpp')
27e446a40SChristopher Meis
37e446a40SChristopher Meisregulators_src = files('xdpe1x2xx/xdpe1x2xx.cpp')
47e446a40SChristopher Meis
57e446a40SChristopher Meisi2cvr_include = include_directories('.')
67e446a40SChristopher Meis
77e446a40SChristopher Meisexecutable(
87e446a40SChristopher Meis    'phosphor-i2cvr-software-update',
97e446a40SChristopher Meis    'i2cvr_software_manager.cpp',
107e446a40SChristopher Meis    i2cvr_src,
117e446a40SChristopher Meis    regulators_src,
12*26d37483SChristopher Meis    include_directories: [common_include, i2cvr_include, libi2c_inc],
137e446a40SChristopher Meis    dependencies: [
147e446a40SChristopher Meis        sdbusplus_dep,
157e446a40SChristopher Meis        phosphor_logging_dep,
167e446a40SChristopher Meis        pdi_dep,
177e446a40SChristopher Meis        boost_dep,
187e446a40SChristopher Meis        libpldm_dep,
19*26d37483SChristopher Meis        libi2c_dep,
207e446a40SChristopher Meis    ],
21*26d37483SChristopher Meis    link_with: [software_common_lib, libpldmutil, libi2c_dev],
227e446a40SChristopher Meis    install: true,
23781de31eSPatrick Williams    install_dir: get_option('libexecdir') / 'phosphor-code-mgmt',
24*26d37483SChristopher Meis    link_args: '-li2c',
257e446a40SChristopher Meis)
267e446a40SChristopher Meis
277e446a40SChristopher Meissystemd_system_unit_dir = dependency('systemd').get_variable(
287e446a40SChristopher Meis    'systemdsystemunitdir',
297e446a40SChristopher Meis    pkgconfig_define: ['prefix', get_option('prefix')],
307e446a40SChristopher Meis)
317e446a40SChristopher Meis
327e446a40SChristopher Meisinstall_data(
337e446a40SChristopher Meis    'xyz.openbmc_project.Software.I2CVR.service',
347e446a40SChristopher Meis    install_dir: systemd_system_unit_dir,
357e446a40SChristopher Meis)
36