blob: dc663d291590c4321f5ccb62ccad886a15dc926d [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
Charles Boyer9f476e82021-07-29 16:33:01 -050038if get_option('clears-sel')
39 cpp_args += '-DSEL_LOGGER_CLEARS_SEL'
40endif
William A. Kennington III147b1fd2021-07-29 14:00:31 -070041
42executable(
43 'sel-logger',
44 'src/sel_logger.cpp',
45 include_directories: include_directories('include'),
46 implicit_include_directories: false,
47 cpp_args: cpp_args,
48 dependencies: deps,
49 install: true,
50 install_dir: get_option('bindir'))
51
52systemd = dependency('systemd')
53if systemd.found()
54 install_data(
55 'service_files/xyz.openbmc_project.Logging.IPMI.service',
56 install_dir: systemd.get_variable(pkgconfig: 'systemdsystemunitdir'))
57endif