diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-02-01 16:53:43 +0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-02-21 10:35:54 +0100 |
commit | 8821a389b1fa2b27bf20245ad059f75482e5f25d (patch) | |
tree | 47d715317ebcdfe38465e18c6f476e83c4a1cae0 /qga | |
parent | 61fb0bd1f6eaec5f9715031df79c7bbba72acbd9 (diff) | |
download | qemu-8821a389b1fa2b27bf20245ad059f75482e5f25d.zip qemu-8821a389b1fa2b27bf20245ad059f75482e5f25d.tar.gz qemu-8821a389b1fa2b27bf20245ad059f75482e5f25d.tar.bz2 |
configure, meson: replace VSS SDK checks and options with --enable-vss-sdk
The VSS headers are part of standard MS VS SDK, at least since version
15, and probably before that.
They are also included with MinGW, although currently broken.
Let's streamline a bit the options, by not making it so special, and
instead rely on proper system headers configuration or user
--extra-cxxflags. This still requires some extra step to cross-build
with MinGW as described in the meson.build file now.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
[Use a "feature"-type option. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qga')
-rw-r--r-- | qga/meson.build | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/qga/meson.build b/qga/meson.build index 97cc391..a32c141 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -2,9 +2,26 @@ 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"''') \ + .allowed() + all_qga = [] qga_qapi_outputs = [ @@ -63,7 +80,7 @@ gen_tlb = [] qga_libs = [] if targetos == 'windows' qga_libs += ['-lws2_32', '-lwinmm', '-lpowrprof', '-lwtsapi32', '-lwininet', '-liphlpapi', '-lnetapi32'] - if 'CONFIG_QGA_VSS' in config_host + if have_qga_vss qga_libs += ['-lole32', '-loleaut32', '-lshlwapi', '-lstdc++', '-Wl,--enable-stdcall-fixup'] subdir('vss-win32') endif @@ -93,7 +110,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 |