blob: 6919c755d49d78eece8bcce511486e1e381144c5 [file] [log] [blame]
John Chunge2fae4b2024-11-13 18:10:31 -06001CLI11_dep = dependency('CLI11')
2
3deps = [
4 dependency('libsystemd'),
5 dependency('systemd'),
6 sdeventplus_dep,
7 stdplus_dep,
8 sdbusplus_dep,
9 phosphor_logging_dep,
Patrick Williamsce3e4872025-03-03 11:07:48 -050010 CLI11_dep,
John Chunge2fae4b2024-11-13 18:10:31 -060011]
12
13serialbridged = executable(
14 'serialbridged',
15 'serialbridged.cpp',
16 'serialcmd.cpp',
17 dependencies: deps,
18 install: true,
Patrick Williamsce3e4872025-03-03 11:07:48 -050019 install_dir: get_option('libexecdir'),
John Chunge2fae4b2024-11-13 18:10:31 -060020)
21
22# Configure and install systemd unit files
23systemd = dependency('systemd')
24if systemd.found()
25 conf_data = configuration_data()
Patrick Williamsce3e4872025-03-03 11:07:48 -050026 conf_data.set(
27 'BIN',
28 get_option('prefix') / get_option('libexecdir') / serialbridged.name(),
29 )
John Chunge2fae4b2024-11-13 18:10:31 -060030 configure_file(
31 input: 'serialbridge@.service.in',
32 output: 'serialbridge@.service',
33 configuration: conf_data,
34 install: true,
Patrick Williamsce3e4872025-03-03 11:07:48 -050035 install_dir: systemd.get_variable(pkgconfig: 'systemdsystemunitdir'),
John Chunge2fae4b2024-11-13 18:10:31 -060036 )
37endif
38
39if not get_option('tests').disabled()
40 subdir('test')
41endif