build/meson: make tools an option

This commit is contained in:
Adrien Béraud committed 2023-03-13 13:24:05 -04:00
1 parent 7fcaf19ca3
commit 4b489fb7d7
2 files changed
+7 -2

No files matched your search

+6 -2
View File
@@ -71,5 +71,9 @@ opendht = shared_library('opendht',
dependencies : deps,
cpp_args : ['-DOPENHT_BUILD', '-Dopendht_EXPORTS'])
readline = meson.get_compiler('c').find_library('readline')
dhtnode = executable('dhtnode', 'tools/dhtnode.cpp', link_with : opendht, dependencies : [readline, msgpack])
readline = meson.get_compiler('c').find_library('readline', required: get_option('tools'))
if get_option('tools').enabled()
dhtnode = executable('dhtnode', 'tools/dhtnode.cpp',
link_with : opendht,
dependencies : [readline, msgpack])
endif
+1
View File
@@ -1,3 +1,4 @@
option('proxy_client', type : 'feature', value : 'disabled')
option('proxy_server', type : 'feature', value : 'disabled')
option('peer_discovery', type : 'feature', value : 'enabled')
option('tools', type : 'feature', value : 'enabled')