blob: 2332607236042629862c0e39477ac83797ba96d2 [file] [log] [blame]
William A. Kennington III147b1fd2021-07-29 14:00:31 -07001project(
2 'phosphor-sel-logger',
3 'cpp',
4 version: '0.1',
Patrick Williamsfd1c3f12023-07-12 11:15:27 -05005 meson_version: '>=1.1.1',
William A. Kennington III147b1fd2021-07-29 14:00:31 -07006 default_options: [
7 'werror=true',
8 'warning_level=3',
Patrick Williamsfd1c3f12023-07-12 11:15:27 -05009 'cpp_std=c++23',
William A. Kennington III147b1fd2021-07-29 14:00:31 -070010 ])
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'),
Konstantin Aladyshev3db11892024-03-29 16:36:24 +030017 dependency('boost'),
William A. Kennington III147b1fd2021-07-29 14:00:31 -070018]
19
20if get_option('log-threshold')
21 cpp_args += '-DSEL_LOGGER_MONITOR_THRESHOLD_EVENTS'
22endif
23if get_option('log-pulse')
24 cpp_args += '-DREDFISH_LOG_MONITOR_PULSE_EVENTS'
25endif
26if get_option('log-watchdog')
27 cpp_args += '-DSEL_LOGGER_MONITOR_WATCHDOG_EVENTS'
28endif
29if get_option('log-alarm')
30 cpp_args += '-DSEL_LOGGER_MONITOR_THRESHOLD_ALARM_EVENTS'
31endif
JinFuLin7c2810b2022-12-02 13:55:28 +080032if get_option('log-host')
33 cpp_args += '-DSEL_LOGGER_MONITOR_HOST_ERROR_EVENTS'
34endif
William A. Kennington III147b1fd2021-07-29 14:00:31 -070035if get_option('send-to-logger')
36 cpp_args += '-DSEL_LOGGER_SEND_TO_LOGGING_SERVICE'
37
Patrick Williams38d32a32022-03-21 11:27:45 -050038 deps += dependency('phosphor-logging')
William A. Kennington III147b1fd2021-07-29 14:00:31 -070039endif
Jonico Eustaquio9fa224c2024-01-10 13:08:52 -060040if get_option('sel-delete')
41 cpp_args += '-DSEL_LOGGER_ENABLE_SEL_DELETE'
42endif
William A. Kennington III147b1fd2021-07-29 14:00:31 -070043
44executable(
45 'sel-logger',
46 'src/sel_logger.cpp',
47 include_directories: include_directories('include'),
48 implicit_include_directories: false,
49 cpp_args: cpp_args,
50 dependencies: deps,
51 install: true,
52 install_dir: get_option('bindir'))
53
54systemd = dependency('systemd')
55if systemd.found()
56 install_data(
57 'service_files/xyz.openbmc_project.Logging.IPMI.service',
Patrick Williams9b2f8db2023-04-12 08:01:05 -050058 install_dir: systemd.get_variable('systemdsystemunitdir'))
William A. Kennington III147b1fd2021-07-29 14:00:31 -070059endif