blob: 8e6ac297ac8ea9e301199e85f009f99112fd18b4 [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 = [
Patrick Williams38d32a32022-03-21 11:27:45 -050015 dependency('sdbusplus'),
William A. Kennington III147b1fd2021-07-29 14:00:31 -070016 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
JinFuLin7c2810b2022-12-02 13:55:28 +080031if get_option('log-host')
32 cpp_args += '-DSEL_LOGGER_MONITOR_HOST_ERROR_EVENTS'
33endif
William A. Kennington III147b1fd2021-07-29 14:00:31 -070034if get_option('send-to-logger')
35 cpp_args += '-DSEL_LOGGER_SEND_TO_LOGGING_SERVICE'
36
Patrick Williams38d32a32022-03-21 11:27:45 -050037 deps += dependency('phosphor-logging')
William A. Kennington III147b1fd2021-07-29 14:00:31 -070038endif
Charles Boyer9f476e82021-07-29 16:33:01 -050039if get_option('clears-sel')
40 cpp_args += '-DSEL_LOGGER_CLEARS_SEL'
41endif
William A. Kennington III147b1fd2021-07-29 14:00:31 -070042
43executable(
44 'sel-logger',
45 'src/sel_logger.cpp',
46 include_directories: include_directories('include'),
47 implicit_include_directories: false,
48 cpp_args: cpp_args,
49 dependencies: deps,
50 install: true,
51 install_dir: get_option('bindir'))
52
53systemd = dependency('systemd')
54if systemd.found()
55 install_data(
56 'service_files/xyz.openbmc_project.Logging.IPMI.service',
57 install_dir: systemd.get_variable(pkgconfig: 'systemdsystemunitdir'))
58endif