Ben Tyner | 73ac368 | 2020-01-09 10:46:47 -0600 | [diff] [blame] | 1 | # async gpio monitor needs boost library |
| 2 | boost_args = ['-DBOOST_ASIO_DISABLE_THREADS', |
| 3 | '-DBOOST_ERROR_CODE_HEADER_ONLY', |
| 4 | '-DBOOST_SYSTEM_NO_DEPRECATED'] |
| 5 | |
Ben Tyner | 9ae5ca4 | 2020-02-28 13:13:50 -0600 | [diff] [blame] | 6 | # dependency to link sdbusplus support |
Ben Tyner | ef32015 | 2020-01-09 10:31:23 -0600 | [diff] [blame] | 7 | sdbusplus = dependency('sdbusplus', version : '>=1.0') |
| 8 | |
Ben Tyner | 73ac368 | 2020-01-09 10:46:47 -0600 | [diff] [blame] | 9 | # dependency to link gpiod support |
| 10 | libgpiod = dependency('libgpiod', version : '>=1.4.1') |
| 11 | |
Ben Tyner | ef32015 | 2020-01-09 10:31:23 -0600 | [diff] [blame] | 12 | # dependency to link libpdbg support |
| 13 | libpdbg = cmplr.find_library('pdbg') |
| 14 | |
Ben Tyner | db37c89 | 2020-02-19 13:08:48 -0600 | [diff] [blame] | 15 | # install systemd unit file |
| 16 | configure_file( |
| 17 | input: 'attn_handler.service', |
| 18 | output: 'attn_handler.service', |
| 19 | copy: true, |
| 20 | install_dir: |
| 21 | dependency('systemd').get_pkgconfig_variable( |
| 22 | 'systemdsystemunitdir') |
| 23 | ) |
Ben Tyner | 0205f3b | 2020-02-24 10:24:47 -0600 | [diff] [blame] | 24 | |
Ben Tyner | 9ae5ca4 | 2020-02-28 13:13:50 -0600 | [diff] [blame] | 25 | # see if phosphor-logging is available, if not use test case logging code |
Ben Tyner | 1368308 | 2020-06-25 12:49:47 -0500 | [diff] [blame] | 26 | if (true == phosphor_logging) |
Ben Tyner | b1ebfcb | 2020-05-08 18:52:48 -0500 | [diff] [blame] | 27 | logging_src = 'attn_logging.cpp' |
Ben Tyner | 9ae5ca4 | 2020-02-28 13:13:50 -0600 | [diff] [blame] | 28 | else |
| 29 | logging_src = '../test/end2end/logging.cpp' |
| 30 | endif |
| 31 | |
| 32 | # gather attention sources to be used here and elsewhere if needed |
| 33 | attn_src = files('attn_main.cpp', 'attn_handler.cpp', 'attn_monitor.cpp', |
Ben Tyner | b481d90 | 2020-03-05 10:24:23 -0600 | [diff] [blame] | 34 | 'bp_handler.cpp', 'ti_handler.cpp', logging_src, |
Ben Tyner | 3fb52e5 | 2020-03-31 10:10:07 -0500 | [diff] [blame] | 35 | 'attention.cpp', 'attn_config.cpp') |
Ben Tyner | 9ae5ca4 | 2020-02-28 13:13:50 -0600 | [diff] [blame] | 36 | |
| 37 | # Create attention handler library |
Ben Tyner | 0205f3b | 2020-02-24 10:24:47 -0600 | [diff] [blame] | 38 | attn = static_library('attn_handler', |
Ben Tyner | 9ae5ca4 | 2020-02-28 13:13:50 -0600 | [diff] [blame] | 39 | attn_src, |
| 40 | include_directories : incdir, |
Ben Tyner | 117af99 | 2020-05-22 13:32:11 -0500 | [diff] [blame] | 41 | dependencies : [libpdbg, sdbusplus, libgpiod], |
Ben Tyner | 1368308 | 2020-06-25 12:49:47 -0500 | [diff] [blame] | 42 | cpp_args : [boost_args, test_arg], |
Ben Tyner | 9ae5ca4 | 2020-02-28 13:13:50 -0600 | [diff] [blame] | 43 | install : true) |