]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: rework and cleanup pdns/meson.build file
authorFred Morcos <fred.morcos@open-xchange.com>
Tue, 15 Aug 2023 21:40:37 +0000 (23:40 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 20 Mar 2024 12:28:38 +0000 (13:28 +0100)
pdns/meson.build

index 85f5234953f8f5a92a3aaceabc975a944bfc42cb..9d6f403920e021aaeff61d8e4040cbb70b63675e 100644 (file)
@@ -2,70 +2,75 @@ libpdns_bindparser = declare_dependency(
   link_with: static_library(
     'pdns-bindparser',
     'zoneparser-tng.cc',
-    'zoneparser-tng.hh',
     flex_generator.process('bindlexer.l'),
     bison_generator.process('bindparser.yy'),
-    dependencies: [dep_pdns],
+    extra_files: [
+      'zoneparser-tng.hh',
+    ],
     cpp_args: '-Wno-redundant-decls',
+    dependencies: [dep_pdns],
   )
 )
 
 libpdns_lua = dependency('', required: false)
 if dep_lua.found()
   libpdns_lua = declare_dependency(
-    sources: [
+    link_with: static_library(
+      'pdns-lua',
       'lua-base4.cc',
-      'lua-base4.hh',
-    ],
-    dependencies: dep_lua,
+      extra_files: [
+        'lua-base4.hh',
+      ],
+      dependencies: [dep_pdns, dep_lua],
+    )
   )
 endif
 
 libpdns_lua_records = dependency('', required: false)
 if opt_lua_records
-  libpdns_lua_records = static_library(
-    'pdns-lua-records',
-    'lua-record.cc',
-    'minicurl.cc',
-    'minicurl.hh',
-    dependencies: [dep_pdns, dep_lua, dep_libcurl],
-  )
-
   libpdns_lua_records = declare_dependency(
-    link_with: libpdns_lua_records,
+    link_with: static_library(
+      'pdns-lua-records',
+      'lua-record.cc',
+      'minicurl.cc',
+      extra_files: [
+        'minicurl.hh',
+      ],
+      dependencies: [dep_pdns, dep_lua, dep_libcurl],
+    )
   )
 endif
 
 libpdns_tsig = dependency('', required: false)
 if dep_gss_tsig.found()
-  libpdns_tsig = static_library(
-    'pdns-tsig',
-    'tsigutils.cc',
-    'tsigutils.hh',
-    'tsigverifier.cc',
-    'tsigverifier.hh',
-    'gss_context.cc',
-    'gss_context.hh',
-    cpp_args: '-Wno-redundant-decls',
-    dependencies: [dep_pdns, dep_gss_tsig],
-  )
-
   libpdns_tsig = declare_dependency(
-    link_with: libpdns_tsig,
+    link_with: static_library(
+      'pdns-tsig',
+      'tsigutils.cc',
+      'tsigverifier.cc',
+      'gss_context.cc',
+      extra_files: [
+        'tsigutils.hh',
+        'tsigverifier.hh',
+        'gss_context.hh',
+      ],
+      cpp_args: '-Wno-redundant-decls',
+      dependencies: [dep_pdns, dep_gss_tsig],
+    )
   )
 endif
 
 libpdns_pkcs11 = dependency('', required: false)
 if dep_pkcs11.found()
-  libpdns_pkcs11 = static_library(
-    'pdns-pkcs11',
-    'pkcs11signers.cc',
-    'pkcs11signers.hh',
-    dependencies: [dep_pdns, dep_pkcs11],
-  )
-
   libpdns_pkcs11 = declare_dependency(
-    link_with: libpdns_pkcs11,
+    link_with: static_library(
+      'pdns-pkcs11',
+      'pkcs11signers.cc',
+      extra_files: [
+        'pkcs11signers.hh',
+      ],
+      dependencies: [dep_pdns, dep_pkcs11],
+    )
   )
 endif
 
@@ -73,175 +78,182 @@ libpdns_ws = declare_dependency(
   link_with: static_library(
     'pdns-ws',
     'webserver.cc',
-    'webserver.hh',
     'ws-api.cc',
-    'ws-api.hh',
+    extra_files: [
+      'webserver.hh',
+      'ws-api.hh',
+    ],
     cpp_args: '-Wno-overloaded-virtual',
     dependencies: [dep_pdns, dep_yahttp, dep_json11],
   )
 )
 
-libpdns = static_library(
-  'pdns',
-  'arguments.cc',
-  'arguments.hh',
-  'axfr-retriever.cc',
-  'axfr-retriever.hh',
-  'backends/gsql/gsqlbackend.cc',
-  'backends/gsql/gsqlbackend.hh',
-  'backends/gsql/ssql.hh',
-  'base32.cc',
-  'base32.hh',
-  'base64.cc',
-  'base64.hh',
-  'bind-dnssec.schema.sqlite3.sql.h',
-  'burtle.hh',
-  'cachecleaner.hh',
-  'circular_buffer.hh',
-  'comment.hh',
-  'communicator.cc',
-  'communicator.hh',
-  'credentials.cc',
-  'credentials.hh',
-  'dbdnsseckeeper.cc',
-  'digests.hh',
-  'distributor.hh',
-  'dns.cc',
-  'dns.hh',
-  'dns_random.hh',
-  'dnsbackend.cc',
-  'dnsbackend.hh',
-  'dnsname.cc',
-  'dnsname.hh',
-  'dnspacket.cc',
-  'dnspacket.hh',
-  'dnsparser.cc',
-  'dnsparser.hh',
-  'dnsproxy.cc',
-  'dnsproxy.hh',
-  'dnsrecords.cc',
-  'dnsrecords.hh',
-  'dnssecinfra.cc',
-  'dnssecinfra.hh',
-  'dnsseckeeper.hh',
-  'dnssecsigner.cc',
-  'dnswriter.cc',
-  'dnswriter.hh',
-  'dynhandler.cc',
-  'dynhandler.hh',
-  'dynlistener.cc',
-  'dynlistener.hh',
-  'dynmessenger.hh',
-  'ednscookies.cc',
-  'ednscookies.hh',
-  'ednsoptions.cc',
-  'ednsoptions.hh',
-  'ednssubnet.cc',
-  'ednssubnet.hh',
-  'gettime.cc',
-  'gettime.hh',
-  'histogram.hh',
-  'iputils.cc',
-  'iputils.hh',
-  'ixfr.cc',
-  'ixfr.hh',
-  'json.cc',
-  'json.hh',
-  'lock.hh',
-  'logger.cc',
-  'logger.hh',
-  'logging.hh',
-  'mastercommunicator.cc',
-  'misc.cc',
-  'misc.hh',
-  'nameserver.cc',
-  'nameserver.hh',
-  'namespaces.hh',
-  'noinitvector.hh',
-  'nsecrecords.cc',
-  'nsecrecords.cc',
-  'opensslsigners.cc',
-  'opensslsigners.hh',
-  'packetcache.hh',
-  'packethandler.cc',
-  'packethandler.hh',
-  'pdnsexception.hh',
-  'proxy-protocol.cc',
-  'proxy-protocol.hh',
-  'qtype.cc',
-  'qtype.hh',
-  'query-local-address.cc',
-  'query-local-address.hh',
-  'rcpgenerator.cc',
-  'rcpgenerator.hh',
-  'resolver.cc',
-  'resolver.hh',
-  'responsestats.cc',
-  'responsestats.hh',
-  'rfc2136handler.cc',
-  'secpoll.cc',
-  'secpoll.hh',
-  'serialtweaker.cc',
-  'sha.hh',
-  'shuffle.cc',
-  'shuffle.hh',
-  'signingpipe.cc',
-  'signingpipe.hh',
-  'sillyrecords.cc',
-  'sillyrecords.cc',
-  'slavecommunicator.cc',
-  'stat_t.hh',
-  'statbag.cc',
-  'statbag.hh',
-  'stubresolver.cc',
-  'stubresolver.hh',
-  'svc-records.cc',
-  'svc-records.hh',
-  'tcpreceiver.cc',
-  'tcpreceiver.hh',
-  'threadname.cc',
-  'threadname.hh',
-  'tkey.cc',
-  'trusted-notification-proxy.cc',
-  'trusted-notification-proxy.hh',
-  'ueberbackend.cc',
-  'ueberbackend.hh',
-  'unix_semaphore.cc',
-  'unix_utility.cc',
-  'unix_utility.cc',
-  'utility.hh',
-  'utility.hh',
-  'uuid-utils.cc',
-  'uuid-utils.hh',
-  'version.cc',
-  'version.hh',
-  'zoneparser-tng.cc',
-  ragel_generator.process('dnslabeltext.rl'),
-  dependencies: [
-    dep_pdns,
-    dep_json11,
-    dep_yahttp,
-    libpdns_bindparser,
-    libpdns_lua,
-    libpdns_lua_records,
-    libpdns_tsig,
-    libpdns_pkcs11,
-    libpdns_ws,
-  ],
+libpdns = declare_dependency(
+  link_with: static_library(
+    'pdns',
+    'arguments.cc',
+    'axfr-retriever.cc',
+    'backends/gsql/gsqlbackend.cc',
+    'base32.cc',
+    'base64.cc',
+    'communicator.cc',
+    'credentials.cc',
+    'dbdnsseckeeper.cc',
+    'dns.cc',
+    'dnsbackend.cc',
+    'dnsname.cc',
+    'dnspacket.cc',
+    'dnsparser.cc',
+    'dnsproxy.cc',
+    'dnsrecords.cc',
+    'dnssecinfra.cc',
+    'dnssecsigner.cc',
+    'dnswriter.cc',
+    'dynhandler.cc',
+    'dynlistener.cc',
+    'ednscookies.cc',
+    'ednsoptions.cc',
+    'ednssubnet.cc',
+    'gettime.cc',
+    'iputils.cc',
+    'ixfr.cc',
+    'json.cc',
+    'logger.cc',
+    'mastercommunicator.cc',
+    'misc.cc',
+    'nameserver.cc',
+    'nsecrecords.cc',
+    'nsecrecords.cc',
+    'opensslsigners.cc',
+    'packethandler.cc',
+    'proxy-protocol.cc',
+    'qtype.cc',
+    'query-local-address.cc',
+    'rcpgenerator.cc',
+    'resolver.cc',
+    'responsestats.cc',
+    'rfc2136handler.cc',
+    'secpoll.cc',
+    'serialtweaker.cc',
+    'shuffle.cc',
+    'signingpipe.cc',
+    'sillyrecords.cc',
+    'sillyrecords.cc',
+    'slavecommunicator.cc',
+    'statbag.cc',
+    'stubresolver.cc',
+    'svc-records.cc',
+    'tcpreceiver.cc',
+    'threadname.cc',
+    'tkey.cc',
+    'trusted-notification-proxy.cc',
+    'ueberbackend.cc',
+    'unix_semaphore.cc',
+    'unix_utility.cc',
+    'unix_utility.cc',
+    'uuid-utils.cc',
+    'version.cc',
+    'zoneparser-tng.cc',
+    ragel_generator.process('dnslabeltext.rl'),
+    extra_files: [
+      'arguments.hh',
+      'axfr-retriever.hh',
+      'backends/gsql/gsqlbackend.hh',
+      'backends/gsql/ssql.hh',
+      'base32.hh',
+      'base64.hh',
+      'bind-dnssec.schema.sqlite3.sql.h',
+      'burtle.hh',
+      'cachecleaner.hh',
+      'circular_buffer.hh',
+      'comment.hh',
+      'communicator.hh',
+      'credentials.hh',
+      'digests.hh',
+      'distributor.hh',
+      'dns.hh',
+      'dns_random.hh',
+      'dnsbackend.hh',
+      'dnsname.hh',
+      'dnspacket.hh',
+      'dnsparser.hh',
+      'dnsproxy.hh',
+      'dnsrecords.hh',
+      'dnssecinfra.hh',
+      'dnsseckeeper.hh',
+      'dnswriter.hh',
+      'dynhandler.hh',
+      'dynlistener.hh',
+      'dynmessenger.hh',
+      'ednscookies.hh',
+      'ednsoptions.hh',
+      'ednssubnet.hh',
+      'gettime.hh',
+      'histogram.hh',
+      'iputils.hh',
+      'ixfr.hh',
+      'json.hh',
+      'lock.hh',
+      'logger.hh',
+      'logging.hh',
+      'misc.hh',
+      'nameserver.hh',
+      'namespaces.hh',
+      'noinitvector.hh',
+      'opensslsigners.hh',
+      'packetcache.hh',
+      'packethandler.hh',
+      'pdnsexception.hh',
+      'proxy-protocol.hh',
+      'qtype.hh',
+      'query-local-address.hh',
+      'rcpgenerator.hh',
+      'resolver.hh',
+      'responsestats.hh',
+      'secpoll.hh',
+      'sha.hh',
+      'shuffle.hh',
+      'signingpipe.hh',
+      'stat_t.hh',
+      'statbag.hh',
+      'stubresolver.hh',
+      'svc-records.hh',
+      'tcpreceiver.hh',
+      'threadname.hh',
+      'trusted-notification-proxy.hh',
+      'ueberbackend.hh',
+      'utility.hh',
+      'uuid-utils.hh',
+      'version.hh',
+    ],
+    dependencies: [
+      dep_pdns,
+      dep_json11,
+      dep_yahttp,
+      libpdns_bindparser,
+      libpdns_lua,
+      libpdns_lua_records,
+      libpdns_tsig,
+      libpdns_pkcs11,
+      libpdns_ws,
+    ],
+  )
 )
 
 libpdns_auth_main = declare_dependency(
   link_with: static_library(
     'pdns-auth-main',
     'auth-main.cc',
-    'auth-main.hh',
+    extra_files: [
+      'auth-main.hh',
+    ],
     cpp_args: '-Wno-overloaded-virtual',
     dependencies: [
       dep_pdns,
       dep_yahttp,
       dep_json11,
       dep_systemd,
-      libpdns_lua_records,
+      libpdns_lua_records,
     ],
   )
 )
@@ -250,46 +262,59 @@ libpdns_auth_ws = declare_dependency(
   link_with: static_library(
     'pdns-auth-ws',
     'ws-auth.cc',
-    'ws-auth.hh',
+    extra_files: [
+      'ws-auth.hh',
+    ],
     cpp_args: '-Wno-overloaded-virtual',
-    dependencies: [dep_pdns, dep_yahttp, dep_json11],
+    dependencies: [
+      dep_pdns,
+      dep_yahttp,
+      dep_json11,
+    ],
   )
 )
 
 libpdns_auth_lua = dependency('', required: false)
 if dep_lua.found()
-  libpdns_auth_lua = static_library(
-    'pdns-auth-lua',
-    'lua-auth4.cc',
-    'lua-auth4.hh',
-    dependencies: [dep_pdns, libpdns_lua],
-  )
-
   libpdns_auth_lua = declare_dependency(
-    link_with: libpdns_auth_lua,
+    link_with: static_library(
+      'pdns-auth-lua',
+      'lua-auth4.cc',
+      extra_files: [
+        'lua-auth4.hh',
+      ],
+      dependencies: [
+        dep_pdns,
+        libpdns_lua,
+      ],
+    )
   )
 endif
 
-libpdns_auth = static_library(
-  'pdns-auth',
-  'auth-caches.cc',
-  'auth-caches.hh',
-  'auth-carbon.cc',
-  'auth-catalogzone.cc',
-  'auth-catalogzone.hh',
-  'auth-packetcache.cc',
-  'auth-packetcache.hh',
-  'auth-querycache.cc',
-  'auth-querycache.hh',
-  'auth-zonecache.cc',
-  'auth-zonecache.hh',
-  'responsestats-auth.cc',
-  'secpoll-auth.cc',
-  'secpoll-auth.hh',
-  dependencies: [
-    dep_pdns,
-    libpdns_auth_lua,
-    libpdns_auth_main,
-    libpdns_auth_ws,
-  ],
+libpdns_auth = declare_dependency(
+  link_with: static_library(
+    'pdns-auth',
+    'auth-caches.cc',
+    'auth-carbon.cc',
+    'auth-catalogzone.cc',
+    'auth-packetcache.cc',
+    'auth-querycache.cc',
+    'auth-zonecache.cc',
+    'responsestats-auth.cc',
+    'secpoll-auth.cc',
+    extra_files: [
+      'auth-caches.hh',
+      'auth-catalogzone.hh',
+      'auth-packetcache.hh',
+      'auth-querycache.hh',
+      'auth-zonecache.hh',
+      'secpoll-auth.hh',
+    ],
+    dependencies: [
+      dep_pdns,
+      libpdns_auth_lua,
+      libpdns_auth_main,
+      libpdns_auth_ws,
+    ],
+  )
 )