From 00e273149d7584750df88be94ce7f53beea26f6d Mon Sep 17 00:00:00 2001
From: MaYunlong <mayunlong6@huawei.com>
Date: Wed, 27 Mar 2024 07:56:14 +0800
Subject: [PATCH] meson.build: isolate the client-qemu using macros

---
 docs/manpages/meson.build | 4 ++--
 meson.build               | 1 +
 tools/meson.build         | 4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/docs/manpages/meson.build b/docs/manpages/meson.build
index bdc1701..38ee547 100644
--- a/docs/manpages/meson.build
+++ b/docs/manpages/meson.build
@@ -18,9 +18,9 @@ docs_man_files = [
   { 'name': 'virt-pki-query-dn', 'section': '1', 'install': true },
   { 'name': 'virt-pki-validate', 'section': '1', 'install': true },
   { 'name': 'virt-qemu-run', 'section': '1', 'install': conf.has('WITH_QEMU') },
-  { 'name': 'virt-qemu-qmp-proxy', 'section': '1', 'install': conf.has('WITH_QEMU') },
+  { 'name': 'virt-qemu-qmp-proxy', 'section': '1', 'install': conf.has('WITH_CLIENT_QEMU') },
   { 'name': 'virt-xml-validate', 'section': '1', 'install': true },
-  { 'name': 'virt-qemu-sev-validate', 'section': '1', 'install': conf.has('WITH_QEMU') },
+  { 'name': 'virt-qemu-sev-validate', 'section': '1', 'install': conf.has('WITH_CLIENT_QEMU') },
 
   { 'name': 'libvirt-guests', 'section': '8', 'install': conf.has('WITH_LIBVIRTD') },
   { 'name': 'libvirtd', 'section': '8', 'install': conf.has('WITH_LIBVIRTD') },
diff --git a/meson.build b/meson.build
index 611cc58..2a7fa8c 100644
--- a/meson.build
+++ b/meson.build
@@ -1637,6 +1637,7 @@ if not get_option('driver_qemu').disabled()
   if use_qemu
     conf.set('WITH_QEMU', 1)
 
+    conf.set('WITH_CLIENT_QEMU', 0)
     qemu_moddir = get_option('qemu_moddir')
     if qemu_moddir == ''
       qemu_moddir = libdir / 'qemu'
diff --git a/tools/meson.build b/tools/meson.build
index c72f760..9a5bbd6 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -301,7 +301,7 @@ if conf.has('WITH_SANLOCK')
   )
 endif
 
-if conf.has('WITH_QEMU')
+if conf.has('WITH_CLIENT_QEMU')
   install_data('virt-qemu-sev-validate',
                install_dir: bindir)
 endif
@@ -327,7 +327,7 @@ if conf.has('WITH_LIBVIRTD')
   endif
 endif
 
-if conf.has('WITH_QEMU')
+if conf.has('WITH_CLIENT_QEMU')
     install_data('virt-qemu-qmp-proxy',
                  install_dir: bindir)
 endif
-- 
2.33.0

