blob: 225fd4704e69d346910907f073f044d62987d710 [file] [log] [blame]
William A. Kennington III147b1fd2021-07-29 14:00:31 -07001project(
2 'phosphor-sel-logger',
3 'cpp',
4 version: '0.1',
5 meson_version: '>=0.57.0',
6 default_options: [
7 'werror=true',
8 'warning_level=3',
9 'cpp_std=c++20',
10 ])
11
12cpp_args = []
13
14deps = [
15 dependency('sdbusplus', fallback: ['sdbusplus', 'sdbusplus_dep']),
16 dependency('systemd'),
17]
18
19if get_option('log-threshold')
20 cpp_args += '-DSEL_LOGGER_MONITOR_THRESHOLD_EVENTS'
21endif
22if get_option('log-pulse')
23 cpp_args += '-DREDFISH_LOG_MONITOR_PULSE_EVENTS'
24endif
25if get_option('log-watchdog')
26 cpp_args += '-DSEL_LOGGER_MONITOR_WATCHDOG_EVENTS'
27endif
28if get_option('log-alarm')
29 cpp_args += '-DSEL_LOGGER_MONITOR_THRESHOLD_ALARM_EVENTS'
30endif
31if get_option('send-to-logger')
32 cpp_args += '-DSEL_LOGGER_SEND_TO_LOGGING_SERVICE'
33
34 deps += dependency(
35 'phosphor-logging',
36 fallback: ['phosphor-logging', 'phosphor_logging_dep'])
37endif
38
39executable(
40 'sel-logger',
41 'src/sel_logger.cpp',
42 include_directories: include_directories('include'),
43 implicit_include_directories: false,
44 cpp_args: cpp_args,
45 dependencies: deps,
46 install: true,
47 install_dir: get_option('bindir'))
48
49systemd = dependency('systemd')
50if systemd.found()
51 install_data(
52 'service_files/xyz.openbmc_project.Logging.IPMI.service',
53 install_dir: systemd.get_variable(pkgconfig: 'systemdsystemunitdir'))
54endif