aboutsummaryrefslogtreecommitdiff
path: root/qga/meson.build
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2022-02-21 17:24:05 +0000
committerPeter Maydell <peter.maydell@linaro.org>2022-02-21 17:24:05 +0000
commit922268067fe4181d6edcfccd689e908e4d1243ad (patch)
treeb2d27104b2a6533a8d3d02e76e8ccadf0975017a /qga/meson.build
parent477c3b934a47adf7de285863f59d6e4503dd1a6d (diff)
parent5dc4618e781f36c4bea1b0cdd1bea75b48640c5a (diff)
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging
* More Meson conversions (0.59.x now required rather than suggested) * UMIP support for TCG x86 * Fix migration crash * Restore error output for check-block # gpg: Signature made Mon 21 Feb 2022 09:35:59 GMT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini-gitlab/tags/for-upstream: (29 commits) configure, meson: move CONFIG_IASL to a Meson option meson, configure: move ntddscsi API check to meson meson: require dynamic linking for VSS support qga/vss-win32: require widl/midl, remove pre-built TLB file meson: do not make qga/vss-win32/meson.build conditional on C++ presence configure, meson: replace VSS SDK checks and options with --enable-vss-sdk qga/vss: use standard windows headers location qga/vss-win32: use widl if available meson: drop --with-win-sdk qga/vss-win32: fix midl arguments meson: refine check for whether to look for virglrenderer configure, meson: move guest-agent, tools to meson configure, meson: move smbd options to meson_options.txt configure, meson: move coroutine options to meson_options.txt configure, meson: move some default-disabled options to meson_options.txt meson: define qemu_cflags/qemu_ldflags configure, meson: move block layer options to meson_options.txt configure, meson: move image format options to meson_options.txt configure, meson: cleanup qemu-ga libraries configure, meson: move TPM check to meson ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'qga/meson.build')
-rw-r--r--qga/meson.build55
1 files changed, 46 insertions, 9 deletions
diff --git a/qga/meson.build b/qga/meson.build
index 1ee9dca60b..54f2da5b07 100644
--- a/qga/meson.build
+++ b/qga/meson.build
@@ -1,3 +1,33 @@
+if not have_ga
+ if get_option('guest_agent_msi').enabled()
+ error('Guest agent MSI requested, but the guest agent is not being built')
+ endif
+ have_qga_vss = false
+ subdir_done()
+endif
+
+have_qga_vss = get_option('qga_vss') \
+ .require(targetos == 'windows',
+ error_message: 'VSS support requires Windows') \
+ .require(link_language == 'cpp',
+ error_message: 'VSS support requires a C++ compiler') \
+ .require(have_vss, error_message: '''VSS support requires VSS headers.
+ If your Visual Studio installation doesn't have the VSS headers,
+ Please download and install Microsoft VSS SDK:
+ http://www.microsoft.com/en-us/download/details.aspx?id=23490
+ On POSIX-systems, MinGW doesn't yet provide working headers.
+ you can extract the SDK headers by:
+ $ scripts/extract-vsssdk-headers setup.exe
+ The headers are extracted in the directory 'inc/win2003'.
+ 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 = []
+
qga_qapi_outputs = [
'qga-qapi-commands.c',
'qga-qapi-commands.h',
@@ -50,19 +80,26 @@ qga_ss.add(when: 'CONFIG_WIN32', if_true: files(
qga_ss = qga_ss.apply(config_host, strict: false)
+gen_tlb = []
+qga_libs = []
+if targetos == 'windows'
+ qga_libs += ['-lws2_32', '-lwinmm', '-lpowrprof', '-lwtsapi32', '-lwininet', '-liphlpapi', '-lnetapi32']
+ if have_qga_vss
+ qga_libs += ['-lole32', '-loleaut32', '-lshlwapi', '-lstdc++', '-Wl,--enable-stdcall-fixup']
+ subdir('vss-win32')
+ endif
+ if have_ntddscsi
+ qga_libs += ['-lsetupapi', '-lcfgmgr32']
+ endif
+endif
+
qga = executable('qemu-ga', qga_ss.sources(),
- link_args: config_host['LIBS_QGA'].split(),
+ link_args: qga_libs,
dependencies: [qemuutil, libudev],
install: true)
-all_qga = [qga]
+all_qga += qga
if targetos == 'windows'
- if 'CONFIG_QGA_VSS' in config_host
- subdir('vss-win32')
- else
- gen_tlb = []
- endif
-
qemu_ga_msi_arch = {
'x86': ['-D', 'Arch=32'],
'x86_64': ['-a', 'x64', '-D', 'Arch=64']
@@ -77,7 +114,7 @@ if targetos == 'windows'
if wixl.found()
deps = [gen_tlb, qga]
qemu_ga_msi_vss = []
- if 'CONFIG_QGA_VSS' in config_host
+ if have_qga_vss
qemu_ga_msi_vss = ['-D', 'InstallVss']
deps += qga_vss
endif