]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: move declarations of resolved and friends
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 25 Jun 2023 06:36:27 +0000 (15:36 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 31 Jul 2023 17:31:36 +0000 (02:31 +0900)
meson.build
src/resolve/meson.build

index 2bff726c4a564f198e938a8cd413f1b6e981c6c0..939ed66fa18f2b2aec8db4ca0ec50618b3177c13 100644 (file)
@@ -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',
index 576c7fc9a19d29ffc7d47e84d4e5e56cb37f13a0..4cc2459b21f58ddbdff8ad88557499d1e5daab66 100644 (file)
@@ -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')