Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
tools/Makefile.am | 9 ---------
tools/meson.build | 17 +++++++++++++++++
2 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/tools/Makefile.am b/tools/Makefile.am
index d285146622f..50acdeab22e 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
-bin_PROGRAMS += virt-login-shell
libexec_PROGRAMS = virt-login-shell-helper
endif WITH_LOGIN_SHELL
@@ -62,14 +61,6 @@ virt-sanlock-cleanup: virt-sanlock-cleanup.in Makefile
noinst_LTLIBRARIES =
-# virt-login-shell will be setuid, and must not link to anything
-# except glibc. It wil scrub the environment and then invoke the
-# real virt-login-shell-helper binary.
-virt_login_shell_SOURCES = \
- virt-login-shell.c
-
-virt_login_shell_CPPFLAGS = $(STANDALONE_CPPFLAGS)
-
virt_login_shell_helper_SOURCES = \
virt-login-shell-helper.c
diff --git a/tools/meson.build b/tools/meson.build
index 8c7d3ec64ab..59c5f3c56ff 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -74,3 +74,20 @@ if conf.has('WITH_HOST_VALIDATE')
install_rpath: libdir,
)
endif
+
+if conf.has('WITH_LOGIN_SHELL')
+ # virt-login-shell will be setuid, and must not link to anything
+ # except glibc. It wil scrub the environment and then invoke the
+ # real virt-login-shell-helper binary.
+ executable(
+ 'virt-login-shell',
+ [
+ 'virt-login-shell.c',
+ ],
+ include_directories: [
+ top_inc_dir,
+ ],
+ install: true,
+ install_dir: bindir,
+ )
+endif
--
2.26.2