From: Tomas Krizek Date: Thu, 24 Jan 2019 15:30:49 +0000 (+0100) Subject: meson: clean up client subdir X-Git-Tag: v4.0.0~24^2~245 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2443fc161d072101fb2eaf479600851deb95385d;p=thirdparty%2Fknot-resolver.git meson: clean up client subdir --- diff --git a/client/meson.build b/client/meson.build index de30d39d3..5a6d848e4 100644 --- a/client/meson.build +++ b/client/meson.build @@ -1,17 +1,26 @@ +kresc_src = [ + 'kresc.c', +] + + +# client dependencies +skip_client = false + libedit = dependency('libedit', required: false) if not libedit.found() # TODO why call find_library? osx workaround? libedit = meson.get_compiler('c').find_library('edit', required: false) + if not libedit.found() + skip_client = true + message('kresc client: libedit not found') + endif endif -if not libedit.found() - warning('kresc build skipped: missing libedit') -else - - kresc_src = [ - 'kresc.c', - ] +# build +if skip_client + warning('kresc client: skipping build') +else kresc = executable( 'kresc', kresc_src, @@ -23,5 +32,4 @@ else install: true, install_dir: 'sbin', ) - endif diff --git a/meson.build b/meson.build index 12d2fbd48..fc6423e41 100644 --- a/meson.build +++ b/meson.build @@ -57,12 +57,6 @@ if not lua_ssl_https warning('lua: ssl.https not found') endif -# TODO why isn't libedit required instead? -libedit = dependency('libedit', required: false) -if not libedit.found() - libedit = meson.get_compiler('c').find_library('edit') -endif - # Variables