George Liu | c7d70b6 | 2021-05-17 16:02:18 +0800 | [diff] [blame] | 1 | project( |
| 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 | |
George Liu | 3c89426 | 2021-12-28 10:32:49 +0800 | [diff] [blame] | 13 | sdbusplus_dep = dependency('sdbusplus') |
| 14 | phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces') |
Andrew Jeffery | ebc30b7 | 2023-02-06 14:19:16 +1030 | [diff] [blame] | 15 | boost = dependency('boost', include_type: 'system') |
George Liu | c7d70b6 | 2021-05-17 16:02:18 +0800 | [diff] [blame] | 16 | deps = [ |
| 17 | sdbusplus_dep, |
| 18 | phosphor_dbus_interfaces_dep, |
Andrew Jeffery | ebc30b7 | 2023-02-06 14:19:16 +1030 | [diff] [blame] | 19 | boost, |
George Liu | c7d70b6 | 2021-05-17 16:02:18 +0800 | [diff] [blame] | 20 | ] |
| 21 | |
Jayashree Dhanapal | 3930b6b | 2022-09-20 17:08:15 +0530 | [diff] [blame] | 22 | udevdir = dependency('udev').get_variable(pkgconfig: 'udevdir') |
| 23 | install_data(['70-leds.rules'], install_dir : udevdir / 'rules.d') |
| 24 | |
| 25 | systemd = dependency('systemd') |
| 26 | install_data( |
| 27 | ['xyz.openbmc_project.led.controller@.service'], |
| 28 | install_dir: systemd.get_variable(pkgconfig: 'systemdsystemunitdir') |
| 29 | ) |
| 30 | |
George Liu | c7d70b6 | 2021-05-17 16:02:18 +0800 | [diff] [blame] | 31 | sources = [ |
| 32 | 'argument.cpp', |
| 33 | 'controller.cpp', |
| 34 | 'physical.cpp', |
| 35 | 'sysfs.cpp', |
| 36 | ] |
| 37 | |
| 38 | executable( |
| 39 | 'phosphor-ledcontroller', |
| 40 | sources, |
| 41 | implicit_include_directories: true, |
| 42 | dependencies: deps, |
| 43 | install: true, |
Jayashree Dhanapal | 3930b6b | 2022-09-20 17:08:15 +0530 | [diff] [blame] | 44 | install_dir: '/usr/libexec/phosphor-led-sysfs' |
George Liu | c7d70b6 | 2021-05-17 16:02:18 +0800 | [diff] [blame] | 45 | ) |
| 46 | |
| 47 | build_tests = get_option('tests') |
| 48 | if build_tests.enabled() |
| 49 | subdir('test') |
| 50 | endif |