Signed-off-by: Pavel Hrdina <phrd...@redhat.com>
---
 tools/Makefile.am | 18 ------------------
 tools/meson.build | 20 ++++++++++++++++++++
 2 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/tools/Makefile.am b/tools/Makefile.am
index 50acdeab22e..de1edbd54a0 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -41,7 +41,6 @@ endif WITH_SANLOCK
 
 if WITH_LOGIN_SHELL
 conf_DATA += virt-login-shell.conf
-libexec_PROGRAMS = virt-login-shell-helper
 endif WITH_LOGIN_SHELL
 
 virt-xml-validate: virt-xml-validate.in Makefile
@@ -61,23 +60,6 @@ virt-sanlock-cleanup: virt-sanlock-cleanup.in Makefile
 
 noinst_LTLIBRARIES =
 
-virt_login_shell_helper_SOURCES = \
-               virt-login-shell-helper.c
-
-virt_login_shell_helper_LDFLAGS = \
-               $(AM_LDFLAGS) \
-               $(COVERAGE_LDFLAGS) \
-               $(NULL)
-virt_login_shell_helper_LDADD = \
-               ../src/libvirt.la \
-               ../src/libvirt-lxc.la \
-               $(GLIB_LIBS) \
-               $(NULL)
-
-virt_login_shell_helper_CFLAGS = \
-               $(AM_CFLAGS) \
-               $(NULL)
-
 virsh_SOURCES = \
                virsh.c virsh.h \
                virsh-backup.c virsh-backup.h \
diff --git a/tools/meson.build b/tools/meson.build
index 59c5f3c56ff..53bc1af7bc4 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -90,4 +90,24 @@ if conf.has('WITH_LOGIN_SHELL')
     install: true,
     install_dir: bindir,
   )
+
+  executable(
+    'virt-login-shell-helper',
+    [
+      'virt-login-shell-helper.c',
+    ],
+    dependencies: [
+      tools_dep,
+    ],
+    link_args: [
+      coverage_flags,
+    ],
+    link_with: [
+      libvirt_lib,
+      libvirt_lxc_lib,
+    ],
+    install: true,
+    install_dir: libexecdir,
+    install_rpath: libdir,
+  )
 endif
-- 
2.26.2

Reply via email to