]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
meson: clean up client subdir
authorTomas Krizek <tomas.krizek@nic.cz>
Thu, 24 Jan 2019 15:30:49 +0000 (16:30 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Tue, 12 Mar 2019 09:41:48 +0000 (10:41 +0100)
client/meson.build
meson.build

index de30d39d3b3580f4ac12bd10dfbd0dcd099a27da..5a6d848e4137af574b969ff336773b30c5d24879 100644 (file)
@@ -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
index 12d2fbd487c48256ea082d64865bf87254a80674..fc6423e412b7f83877eae79df51de4615e402f00 100644 (file)
@@ -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