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') |
George Liu | c7d70b6 | 2021-05-17 16:02:18 +0800 | [diff] [blame] | 15 | |
| 16 | deps = [ |
| 17 | sdbusplus_dep, |
| 18 | phosphor_dbus_interfaces_dep, |
| 19 | ] |
| 20 | |
| 21 | sources = [ |
| 22 | 'argument.cpp', |
| 23 | 'controller.cpp', |
| 24 | 'physical.cpp', |
| 25 | 'sysfs.cpp', |
| 26 | ] |
| 27 | |
| 28 | executable( |
| 29 | 'phosphor-ledcontroller', |
| 30 | sources, |
| 31 | implicit_include_directories: true, |
| 32 | dependencies: deps, |
| 33 | install: true, |
| 34 | install_dir: '/usr/sbin' |
| 35 | ) |
| 36 | |
| 37 | build_tests = get_option('tests') |
| 38 | if build_tests.enabled() |
| 39 | subdir('test') |
| 40 | endif |