]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: Cleanup CDB module
authorFred Morcos <fred.morcos@open-xchange.com>
Tue, 22 Aug 2023 10:12:22 +0000 (12:12 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 20 Mar 2024 12:28:45 +0000 (13:28 +0100)
meson/cdb/meson.build

index c59f30227819a63aa450c6fee5c52f8ea20cc018..227b2b276fc92f14f2f2d45886ca3c262a5ebcb3 100644 (file)
@@ -1,16 +1,17 @@
-# CDB
-# Outputs: deps_cdb
+dep_cdb = dependency('libcdb', required: false)
 
-deps_cdb = dependency('libcdb', required: false)
-
-if not deps_cdb.found()
+if not dep_cdb.found()
   if cxx.has_header('cdb.h', required: true)
     if cxx.has_function('cdb_find', args: ['-lcdb'])
-      deps_cdb = declare_dependency(link_args: ['-lcdb'])
+      dep_cdb = declare_dependency(link_args: ['-lcdb'])
     endif
   endif
 endif
 
-conf.set10('HAVE_CDB', deps_cdb.found(), description: 'Whether we have CDB')
-conf.set10('CDB', deps_cdb.found(), description: 'Whether we have CDB')
-summary('CDB', deps_cdb.found(), bool_yn: true, section: 'Configuration')
+conf.set('HAVE_CDB', dep_cdb.found(), description: 'Whether we have CDB')
+
+summary('CDB', dep_cdb.found(), bool_yn: true, section: 'CDB')
+
+if dep_cdb.found()
+  summary('Version', dep_cdb.version(), bool_yn: true, section: 'CDB')
+endif