blob: 0c7f34cfc0b9abe7f45c933add1900af2bc9cd57 [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
31if get_option('send-to-logger')
32 cpp_args += '-DSEL_LOGGER_SEND_TO_LOGGING_SERVICE'
33
Patrick Williams38d32a32022-03-21 11:27:45 -050034 deps += dependency('phosphor-logging')
William A. Kennington III147b1fd2021-07-29 14:00:31 -070035endif
Charles Boyer9f476e82021-07-29 16:33:01 -050036if get_option('clears-sel')
37 cpp_args += '-DSEL_LOGGER_CLEARS_SEL'
38endif
William A. Kennington III147b1fd2021-07-29 14:00:31 -070039
40executable(
41 'sel-logger',
42 'src/sel_logger.cpp',
43 include_directories: include_directories('include'),
44 implicit_include_directories: false,
45 cpp_args: cpp_args,
46 dependencies: deps,
47 install: true,
48 install_dir: get_option('bindir'))
49
50systemd = dependency('systemd')
51if systemd.found()
52 install_data(
53 'service_files/xyz.openbmc_project.Logging.IPMI.service',
54 install_dir: systemd.get_variable(pkgconfig: 'systemdsystemunitdir'))
55endif