]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
meson: require dynamic linking for VSS support
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 2 Feb 2022 09:14:49 +0000 (10:14 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 21 Feb 2022 09:35:54 +0000 (10:35 +0100)
The glib_dynamic detection does not work because the dependency is
overridden in the main meson.build.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
[Rewritten commit message, added requirement in qga/meson.build - Paolo]
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qga/meson.build
qga/vss-win32/meson.build

index 4ac781cb332a3c44a06a990b5c6a8eb14281c701..d22ecb41872c604e1b6e326f19f39040b43d12cc 100644 (file)
@@ -22,6 +22,8 @@ have_qga_vss = get_option('qga_vss') \
     Then run configure with: --extra-cxxflags="-isystem /path/to/vss/inc/win2003"''') \
   .require(midl.found() or widl.found(),
            error_message: 'VSS support requires midl or widl') \
+  .require(not enable_static,
+           error_message: 'VSS support requires dynamic linking with GLib') \
   .allowed()
 
 all_qga = []
index c064a4e245386489db6aeb74847c5afccc299497..71c50d0866c43516742614e7920d5abcccb37c0a 100644 (file)
@@ -1,4 +1,3 @@
-glib_dynamic = dependency('glib-2.0', static: false)
 link_args = cc.get_supported_link_arguments([
   '-fstack-protector-all',
   '-fstack-protector-strong',
@@ -14,7 +13,8 @@ qga_vss = shared_module(
   link_args: link_args,
   vs_module_defs: 'qga-vss.def',
   dependencies: [
-    glib_dynamic, socket,
+    glib,
+    socket,
     cc.find_library('ole32'),
     cc.find_library('oleaut32'),
     cc.find_library('shlwapi'),