blob: 294644fc303ed69cdb1b5090e2e711dcb4f5968f [file] [log] [blame]
Ben Tyner73ac3682020-01-09 10:46:47 -06001# async gpio monitor needs boost library
2boost_args = ['-DBOOST_ASIO_DISABLE_THREADS',
3 '-DBOOST_ERROR_CODE_HEADER_ONLY',
4 '-DBOOST_SYSTEM_NO_DEPRECATED']
5
Ben Tyner73ac3682020-01-09 10:46:47 -06006# dependency to link gpiod support
7libgpiod = dependency('libgpiod', version : '>=1.4.1')
8
Ben Tyneref320152020-01-09 10:31:23 -06009# dependency to link libpdbg support
10libpdbg = cmplr.find_library('pdbg')
11
Ben Tynerdb37c892020-02-19 13:08:48 -060012# install systemd unit file
13configure_file(
14 input: 'attn_handler.service',
15 output: 'attn_handler.service',
16 copy: true,
17 install_dir:
18 dependency('systemd').get_pkgconfig_variable(
19 'systemdsystemunitdir')
20)
Ben Tyner0205f3b2020-02-24 10:24:47 -060021
Ben Tyner9ae5ca42020-02-28 13:13:50 -060022# see if phosphor-logging is available, if not use test case logging code
Ben Tyner13683082020-06-25 12:49:47 -050023if (true == phosphor_logging)
Ben Tynerb1ebfcb2020-05-08 18:52:48 -050024 logging_src = 'attn_logging.cpp'
Ben Tyner9ae5ca42020-02-28 13:13:50 -060025else
26 logging_src = '../test/end2end/logging.cpp'
27endif
28
29# gather attention sources to be used here and elsewhere if needed
30attn_src = files('attn_main.cpp', 'attn_handler.cpp', 'attn_monitor.cpp',
Ben Tynerb481d902020-03-05 10:24:23 -060031 'bp_handler.cpp', 'ti_handler.cpp', logging_src,
Ben Tyner3fb52e52020-03-31 10:10:07 -050032 'attention.cpp', 'attn_config.cpp')
Ben Tyner9ae5ca42020-02-28 13:13:50 -060033
34# Create attention handler library
Ben Tyner0205f3b2020-02-24 10:24:47 -060035attn = static_library('attn_handler',
Ben Tyner9ae5ca42020-02-28 13:13:50 -060036 attn_src,
37 include_directories : incdir,
Zane Shelley61465db2020-10-30 14:53:11 -050038 dependencies : [libpdbg, sdbusplus_dep, libgpiod],
Ben Tyner13683082020-06-25 12:49:47 -050039 cpp_args : [boost_args, test_arg],
Ben Tyner9ae5ca42020-02-28 13:13:50 -060040 install : true)