Skip to content

Commit

Permalink
meson.build: Make building qrtr-ns opt-in
Browse files Browse the repository at this point in the history
It's been moved to the kernel since forever..

Signed-off-by: Konrad Dybcio <[email protected]>
  • Loading branch information
konradybcio authored and Konrad Dybcio committed Apr 9, 2024
1 parent d9e0ddf commit 8f9b2bc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
3 changes: 2 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ project('qrtr',
])

prefix = get_option('prefix')
with_qrtr_ns = get_option('qrtr-ns')

install_systemd_unit = get_option('systemd-service')
systemd = dependency('systemd', required : install_systemd_unit)
Expand All @@ -29,7 +30,7 @@ subdir('lib')
subdir('include')
subdir('src')

if systemd.found()
if systemd.found() and with_qrtr_ns.enabled()
systemd_unit_conf = configuration_data()
systemd_unit_conf.set('prefix', prefix)
configure_file(
Expand Down
6 changes: 6 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
option('qrtr-ns',
type: 'feature',
value: 'auto',
description: 'Whether or not to build the qrtr-ns binary'
)

option('systemd-unit-prefix',
type: 'string',
description: 'Directory for systemd system unit files'
Expand Down
24 changes: 13 additions & 11 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@ executable('qrtr-cfg',
include_directories : inc,
install : true)

ns_srcs = ['addr.c',
'hash.c',
'map.c',
'ns.c',
'util.c',
'waiter.c']
executable('qrtr-ns',
ns_srcs,
link_with : libqrtr,
include_directories : inc,
install : true)
if with_qrtr_ns.enabled()
ns_srcs = ['addr.c',
'hash.c',
'map.c',
'ns.c',
'util.c',
'waiter.c']
executable('qrtr-ns',
ns_srcs,
link_with : libqrtr,
include_directories : inc,
install : true)
endif

executable('qrtr-lookup',
'lookup.c',
Expand Down

0 comments on commit 8f9b2bc

Please sign in to comment.