From 76e76861fd9f9ce26035384d742bd01bab5b554b Mon Sep 17 00:00:00 2001 From: Fred Morcos Date: Fri, 25 Aug 2023 23:18:31 +0200 Subject: [PATCH] Meson: Build pdnsutil --- meson.build | 17 +++++++++-- pdns/meson.build | 76 ++++++++++++++++++++++++++++++++++-------------- 2 files changed, 69 insertions(+), 24 deletions(-) diff --git a/meson.build b/meson.build index 26e7707d7c..b6a5807653 100644 --- a/meson.build +++ b/meson.build @@ -210,13 +210,26 @@ deps = [ ] subdir('pdns') -pdns_server = executable( - 'pdns_server', +pdns_auth = executable( + 'pdns-auth', config_h, export_dynamic: true, dependencies: [ libpdns, libpdns_auth, + libpdns_auth_main, + libpdns_auth_ws, dep_modules, ], ) + +pdns_util = executable( + 'pdns-util', + config_h, + dependencies: [ + libpdns, + libpdns_auth, + libpdns_util, + libpdns_util_main, + ], +) diff --git a/pdns/meson.build b/pdns/meson.build index bd7e2bd90d..0c3c62dc35 100644 --- a/pdns/meson.build +++ b/pdns/meson.build @@ -1,21 +1,3 @@ -libpdns_bind_dnssec_schema = custom_target( - 'libpdns-bind-dnssec-schema', - command: [ - python_prog, - '@INPUT0@', - '@INPUT1@', - ], - input: [ - 'generate-bind-dnssec-schema.py', - 'bind-dnssec.schema.sqlite3.sql', - ], - output: 'bind-dnssec.schema.sqlite3.sql.h', - capture: true, -) -libpdns_bind_dnssec_schema = declare_dependency( - sources: [libpdns_bind_dnssec_schema], -) - libpdns_bind_parser = declare_dependency( link_with: static_library( 'pdns-bind-parser', @@ -249,7 +231,6 @@ libpdns = declare_dependency( ], dependencies: [ deps, - libpdns_bind_dnssec_schema, libpdns_bind_parser, libpdns_lua, libpdns_lua_records, @@ -319,7 +300,7 @@ endif libpdns_auth = declare_dependency( link_with: static_library( - 'pdns-auth', + 'libpdns-auth', 'auth-caches.cc', 'auth-carbon.cc', 'auth-catalogzone.cc', @@ -342,8 +323,59 @@ libpdns_auth = declare_dependency( deps, libpdns_auth_api_swagger, libpdns_auth_lua, - libpdns_auth_main, - libpdns_auth_ws, + ], + ) +) + +libpdns_bind_dnssec_schema = custom_target( + 'libpdns-bind-dnssec-schema', + command: [ + python_prog, + '@INPUT0@', + '@INPUT1@', + ], + input: [ + 'generate-bind-dnssec-schema.py', + 'bind-dnssec.schema.sqlite3.sql', + ], + output: 'bind-dnssec.schema.sqlite3.sql.h', + capture: true, +) +libpdns_bind_dnssec_schema = declare_dependency( + sources: [libpdns_bind_dnssec_schema], +) + +libpdns_ipcipher = dependency('', required: false) +if enable_ipcipher + libpdns_ipcipher = declare_dependency( + link_with: static_library( + 'libpdns-ipcipher', + 'ipcipher.cc', + dependencies: deps, + ) + ) +endif + +libpdns_util_main = declare_dependency( + link_with: static_library( + 'libpdns-util-main', + 'pdnsutil.cc', + dependencies: deps, + ) +) + +libpdns_util = declare_dependency( + link_with: static_library( + 'libpdns-util', + 'zonemd.cc', + extra_files: [ + 'zonemd.hh', + ], + dependencies: [ + deps, + libpdns_util_main, + libpdns_bind_dnssec_schema, + libpdns_ipcipher, ], ) ) -- 2.47.2