have_qga_vss = get_option('qga_vss') \
.require(targetos == 'windows',
error_message: 'VSS support requires Windows') \
- .require(link_language == 'cpp',
+ .require('cpp' in all_languages,
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,
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,
+ .require(not get_option('prefer_static'),
error_message: 'VSS support requires dynamic linking with GLib') \
.allowed()
'vss-win32.c'
))
-qga_ss = qga_ss.apply(config_host, strict: false)
+qga_ss = qga_ss.apply(config_targetos, strict: false)
gen_tlb = []
qga_libs = []
endif
endif
-qga = executable('qemu-ga', qga_ss.sources(),
+qga_objs = []
+if targetos == 'windows'
+ windmc = find_program('windmc', required: true)
+ windres = find_program('windres', required: true)
+
+ msgrc = custom_target('messages-win32.rc',
+ input: 'messages-win32.mc',
+ output: ['messages-win32.rc', 'MSG00409.bin', 'messages-win32.h'],
+ command: [windmc, '-h', '@OUTDIR@', '-r', '@OUTDIR@', '@INPUT@'])
+ msgobj = custom_target('messages-win32.o',
+ input: msgrc[0],
+ output: 'messages-win32.o',
+ command: [windres, '-I', '@OUTDIR@', '-o', '@OUTPUT@', '@INPUT@'])
+
+ qga_objs = [msgobj]
+endif
+
+qga = executable('qemu-ga', qga_ss.sources() + qga_objs,
link_args: qga_libs,
dependencies: [qemuutil, libudev],
install: true)
qemu_ga_msi_vss = ['-D', 'InstallVss']
deps += qga_vss
endif
+ if glib.version() < '2.73.2'
+ libpcre = 'libpcre1'
+ else
+ libpcre = 'libpcre2'
+ endif
+ qga_msi_version = get_option('qemu_ga_version') == '' \
+ ? project.version() \
+ : get_option('qemu_ga_version')
qga_msi = custom_target('QGA MSI',
input: files('installer/qemu-ga.wxs'),
output: 'qemu-ga-@0@.msi'.format(host_arch),
qemu_ga_msi_arch[cpu],
qemu_ga_msi_vss,
'-D', 'BUILD_DIR=' + meson.project_build_root(),
- '-D', 'BIN_DIR=' + glib.get_variable('bindir'),
- '-D', 'QEMU_GA_VERSION=' + config_host['QEMU_GA_VERSION'],
- '-D', 'QEMU_GA_MANUFACTURER=' + config_host['QEMU_GA_MANUFACTURER'],
- '-D', 'QEMU_GA_DISTRO=' + config_host['QEMU_GA_DISTRO'],
+ '-D', 'BIN_DIR=' + glib_pc.get_variable('bindir'),
+ '-D', 'QEMU_GA_VERSION=' + qga_msi_version,
+ '-D', 'QEMU_GA_MANUFACTURER=' + get_option('qemu_ga_manufacturer'),
+ '-D', 'QEMU_GA_DISTRO=' + get_option('qemu_ga_distro'),
+ '-D', 'LIBPCRE=' + libpcre,
])
all_qga += [qga_msi]
alias_target('msi', qga_msi)
# the leak detector in build-oss-fuzz Gitlab CI test. we should re-enable
# this when an alternative is implemented or when the underlying glib
# issue is identified/fix
-#if 'CONFIG_POSIX' in config_host
+#if targetos != 'windows'
if false
srcs = [files('commands-posix-ssh.c')]
i = 0