blob: 0b66f4ba041323ca3e93d5fe5fe2dcc8e6e6e59b [file] [log] [blame]
George Liuc7d70b62021-05-17 16:02:18 +08001project(
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(
14 'sdbusplus',
15 fallback: [
16 'sdbusplus',
17 'sdbusplus_dep'
18 ],
19)
20phosphor_dbus_interfaces_dep = dependency(
21 'phosphor-dbus-interfaces',
22 fallback: [
23 'phosphor-dbus-interfaces',
24 'phosphor_dbus_interfaces_dep'
25 ],
26)
27
28deps = [
29 sdbusplus_dep,
30 phosphor_dbus_interfaces_dep,
31]
32
33sources = [
34 'argument.cpp',
35 'controller.cpp',
36 'physical.cpp',
37 'sysfs.cpp',
38]
39
40executable(
41 'phosphor-ledcontroller',
42 sources,
43 implicit_include_directories: true,
44 dependencies: deps,
45 install: true,
46 install_dir: '/usr/sbin'
47)
48
49build_tests = get_option('tests')
50if build_tests.enabled()
51 subdir('test')
52endif