From c19cd8654296f1a6f058d12efa1398a643b3b55a Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 25 Jun 2023 15:36:27 +0900 Subject: [PATCH] meson: move declarations of resolved and friends --- meson.build | 38 ------------------------------------- src/resolve/meson.build | 42 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/meson.build b/meson.build index 2bff726c4a5..939ed66fa18 100644 --- a/meson.build +++ b/meson.build @@ -2558,44 +2558,6 @@ if want_tests != 'false' depends : exe) endif -if conf.get('ENABLE_RESOLVE') == 1 - dbus_programs += executable( - 'systemd-resolved', - systemd_resolved_sources, - include_directories : resolve_includes, - link_with : [libshared, - libbasic_gcrypt, - libsystemd_resolve_core], - dependencies : [systemd_resolved_dependencies, - userspace], - install_rpath : pkglibdir, - install : true, - install_dir : libexecdir) - - public_programs += executable( - 'resolvectl', - resolvectl_sources, - include_directories : includes, - link_with : [libshared, - libbasic_gcrypt, - libsystemd_resolve_core], - dependencies : [lib_openssl_or_gcrypt, - libidn, - libm, - threads, - userspace], - install_rpath : pkglibdir, - install : true) - - meson.add_install_script(meson_make_symlink, - bindir / 'resolvectl', - sbindir / 'resolvconf') - - meson.add_install_script(meson_make_symlink, - bindir / 'resolvectl', - bindir / 'systemd-resolve') -endif - if conf.get('ENABLE_LOGIND') == 1 dbus_programs += executable( 'systemd-logind', diff --git a/src/resolve/meson.build b/src/resolve/meson.build index 576c7fc9a19..4cc2459b21f 100644 --- a/src/resolve/meson.build +++ b/src/resolve/meson.build @@ -117,6 +117,38 @@ if conf.get('ENABLE_DNS_OVER_TLS') == 1 endif endif +link_with = [ + libbasic_gcrypt, + libshared, + libsystemd_resolve_core, +] + +executables += [ + libexec_template + { + 'name' : 'systemd-resolved', + 'dbus' : true, + 'conditions' : ['ENABLE_RESOLVE'], + 'sources' : systemd_resolved_sources + + files('resolved.c'), + 'include_directories' : resolve_includes, + 'link_with' : link_with, + 'dependencies' : systemd_resolved_dependencies, + }, + executable_template + { + 'name' : 'resolvectl', + 'public' : true, + 'conditions' : ['ENABLE_RESOLVE'], + 'sources' : resolvectl_sources, + 'link_with' : link_with, + 'dependencies' : [ + lib_openssl_or_gcrypt, + libidn, + libm, + threads, + ], + }, +] + if conf.get('ENABLE_RESOLVE') == 1 install_data('org.freedesktop.resolve1.conf', install_dir : dbuspolicydir) @@ -126,6 +158,14 @@ if conf.get('ENABLE_RESOLVE') == 1 install_dir : polkitpolicydir) install_data('resolv.conf', install_dir : libexecdir) + + meson.add_install_script(meson_make_symlink, + bindir / 'resolvectl', + sbindir / 'resolvconf') + + meson.add_install_script(meson_make_symlink, + bindir / 'resolvectl', + bindir / 'systemd-resolve') endif custom_target( @@ -210,5 +250,3 @@ fuzzers += [ 'base' : fuzzer_resolve_base, }, ] - -systemd_resolved_sources += files('resolved.c')