Ben Tyner | ef32015 | 2020-01-09 10:31:23 -0600 | [diff] [blame] | 1 | # needed to find external libraries not registered with package manager |
| 2 | cmplr = meson.get_compiler('cpp') |
| 3 | |
Ben Tyner | 73ac368 | 2020-01-09 10:46:47 -0600 | [diff] [blame] | 4 | # async gpio monitor needs boost library |
| 5 | boost_args = ['-DBOOST_ASIO_DISABLE_THREADS', |
| 6 | '-DBOOST_ERROR_CODE_HEADER_ONLY', |
| 7 | '-DBOOST_SYSTEM_NO_DEPRECATED'] |
| 8 | |
Ben Tyner | ef32015 | 2020-01-09 10:31:23 -0600 | [diff] [blame] | 9 | # dependency to link dbus support |
| 10 | sdbusplus = dependency('sdbusplus', version : '>=1.0') |
| 11 | |
Ben Tyner | 73ac368 | 2020-01-09 10:46:47 -0600 | [diff] [blame] | 12 | # dependency to link gpiod support |
| 13 | libgpiod = dependency('libgpiod', version : '>=1.4.1') |
| 14 | |
Ben Tyner | ef32015 | 2020-01-09 10:31:23 -0600 | [diff] [blame] | 15 | # dependency to link libpdbg support |
| 16 | libpdbg = cmplr.find_library('pdbg') |
| 17 | |
| 18 | # libpdbg requires linking with "whole-archive" option |
| 19 | whole_archive = declare_dependency(link_args : '-Wl,--whole-archive') |
| 20 | no_whole_archive = declare_dependency(link_args : '-Wl,--no-whole-archive') |
| 21 | |
| 22 | executable('attn_handler', |
Ben Tyner | 73ac368 | 2020-01-09 10:46:47 -0600 | [diff] [blame] | 23 | 'attn_main.cpp', 'attn_handler.cpp', 'attn_monitor.cpp', |
Ben Tyner | ef32015 | 2020-01-09 10:31:23 -0600 | [diff] [blame] | 24 | dependencies : [whole_archive, libpdbg, |
Ben Tyner | 73ac368 | 2020-01-09 10:46:47 -0600 | [diff] [blame] | 25 | no_whole_archive, sdbusplus, libgpiod], |
| 26 | cpp_args : boost_args, |
Ben Tyner | ef32015 | 2020-01-09 10:31:23 -0600 | [diff] [blame] | 27 | install : true) |