Blob Blame History Raw
From 2ee0253554227bd0cd26a00467765187168dda87 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
Date: Wed, 2 Feb 2022 00:23:33 +0400
Subject: [PATCH] meson: do not make qga/vss-win32/meson.build conditional on
 C++ presence
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

C++ presence is checked by the qga/ directory, so it can be assumed
when building VSS module.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 qga/vss-win32/meson.build | 41 +++++++++++++++++++++++----------------
 1 file changed, 24 insertions(+), 17 deletions(-)

diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build
index 90825edef3..5982a6c6d8 100644
--- a/qga/vss-win32/meson.build
+++ b/qga/vss-win32/meson.build
@@ -1,22 +1,29 @@
-if add_languages('cpp', required: false)
-  glib_dynamic = dependency('glib-2.0', static: false)
-  link_args = cc.get_supported_link_arguments(['-fstack-protector-all', '-fstack-protector-strong',
-                                               '-Wl,--add-stdcall-alias', '-Wl,--enable-stdcall-fixup'])
+glib_dynamic = dependency('glib-2.0', static: false)
+link_args = cc.get_supported_link_arguments([
+  '-fstack-protector-all',
+  '-fstack-protector-strong',
+  '-Wl,--add-stdcall-alias',
+  '-Wl,--enable-stdcall-fixup'
+])
 
-  qga_vss = shared_module('qga-vss', ['requester.cpp', 'provider.cpp', 'install.cpp'],
-                name_prefix: '',
-                cpp_args: ['-Wno-unknown-pragmas', '-Wno-delete-non-virtual-dtor', '-Wno-non-virtual-dtor'],
-                link_args: link_args,
-                vs_module_defs: 'qga-vss.def',
-                dependencies: [glib_dynamic, socket,
-                               cc.find_library('ole32'),
-                               cc.find_library('oleaut32'),
-                               cc.find_library('shlwapi'),
-                               cc.find_library('uuid'),
-                               cc.find_library('intl')])
+qga_vss = shared_module(
+  'qga-vss',
+  ['requester.cpp', 'provider.cpp', 'install.cpp'],
+  name_prefix: '',
+  cpp_args: ['-Wno-unknown-pragmas', '-Wno-delete-non-virtual-dtor', '-Wno-non-virtual-dtor'],
+  link_args: link_args,
+  vs_module_defs: 'qga-vss.def',
+  dependencies: [
+    glib_dynamic, socket,
+    cc.find_library('ole32'),
+    cc.find_library('oleaut32'),
+    cc.find_library('shlwapi'),
+    cc.find_library('uuid'),
+    cc.find_library('intl')
+  ]
+)
 
-  all_qga += qga_vss
-endif
+all_qga += qga_vss
 
 # rules to build qga-vss.tlb
 # Currently, only native build is supported because building .tlb
-- 
2.25.1