blob: c715dce842979d220086c9f60dce1d4fcc72355b [file] [log] [blame]
Ben Tyneref320152020-01-09 10:31:23 -06001# needed to find external libraries not registered with package manager
2cmplr = meson.get_compiler('cpp')
3
Ben Tyner73ac3682020-01-09 10:46:47 -06004# async gpio monitor needs boost library
5boost_args = ['-DBOOST_ASIO_DISABLE_THREADS',
6 '-DBOOST_ERROR_CODE_HEADER_ONLY',
7 '-DBOOST_SYSTEM_NO_DEPRECATED']
8
Ben Tyneref320152020-01-09 10:31:23 -06009# dependency to link dbus support
10sdbusplus = dependency('sdbusplus', version : '>=1.0')
11
Ben Tyner73ac3682020-01-09 10:46:47 -060012# dependency to link gpiod support
13libgpiod = dependency('libgpiod', version : '>=1.4.1')
14
Ben Tyneref320152020-01-09 10:31:23 -060015# dependency to link libpdbg support
16libpdbg = cmplr.find_library('pdbg')
17
18# libpdbg requires linking with "whole-archive" option
19whole_archive = declare_dependency(link_args : '-Wl,--whole-archive')
20no_whole_archive = declare_dependency(link_args : '-Wl,--no-whole-archive')
21
Ben Tynerdb37c892020-02-19 13:08:48 -060022# install systemd unit file
23configure_file(
24 input: 'attn_handler.service',
25 output: 'attn_handler.service',
26 copy: true,
27 install_dir:
28 dependency('systemd').get_pkgconfig_variable(
29 'systemdsystemunitdir')
30)
Ben Tyneref320152020-01-09 10:31:23 -060031executable('attn_handler',
Ben Tyner73ac3682020-01-09 10:46:47 -060032 'attn_main.cpp', 'attn_handler.cpp', 'attn_monitor.cpp',
Ben Tyneref320152020-01-09 10:31:23 -060033 dependencies : [whole_archive, libpdbg,
Ben Tyner73ac3682020-01-09 10:46:47 -060034 no_whole_archive, sdbusplus, libgpiod],
35 cpp_args : boost_args,
Ben Tyneref320152020-01-09 10:31:23 -060036 install : true)