1project( 2 'phosphor-ledcontroller', 'cpp', 3 version : '1.0.0', 4 meson_version: '>=0.57.0', 5 default_options: [ 6 'warning_level=3', 7 'werror=true', 8 'cpp_std=c++20', 9 'buildtype=debugoptimized' 10 ] 11) 12 13sdbusplus_dep = dependency('sdbusplus') 14phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces') 15boost = dependency('boost', include_type: 'system') 16deps = [ 17 sdbusplus_dep, 18 phosphor_dbus_interfaces_dep, 19 boost, 20] 21 22udevdir = dependency('udev').get_variable(pkgconfig: 'udevdir') 23install_data(['udev' / 'rules.d' / '70-leds.rules'], install_dir : udevdir / 'rules.d') 24 25systemd = dependency('systemd') 26install_data( 27 ['xyz.openbmc_project.led.controller@.service'], 28 install_dir: systemd.get_variable(pkgconfig: 'systemdsystemunitdir') 29) 30 31sources = [ 32 'argument.cpp', 33 'controller.cpp', 34 'physical.cpp', 35 'sysfs.cpp', 36] 37 38executable( 39 'phosphor-ledcontroller', 40 sources, 41 implicit_include_directories: true, 42 dependencies: deps, 43 install: true, 44 install_dir: '/usr/libexec/phosphor-led-sysfs' 45) 46 47build_tests = get_option('tests') 48if build_tests.enabled() 49 subdir('test') 50endif 51