From dbf0fcef7ea7718cac8afb39dd9877aa925d77d7 Mon Sep 17 00:00:00 2001 From: Kostiantyn Kostiuk Date: Mon, 30 Mar 2026 14:39:02 +0300 Subject: [PATCH] qga/meson: Use windows.compile_resources instead of custom_target windows.compile_resources supports more compiles and works in both MinGW and MSVC environment. While 'windres' is a MinGW specific tool. Signed-off-by: Kostiantyn Kostiuk Link: https://lore.kernel.org/r/20260330113906.168002-4-kkostiuk@redhat.com Signed-off-by: Paolo Bonzini --- qga/meson.build | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/qga/meson.build b/qga/meson.build index 1c6433ef25..85bdacf7e2 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -105,16 +105,14 @@ endif qga_objs = [] if host_os == '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@']) + + windows = import('windows') + msgobj = windows.compile_resources(msgrc[0]) qga_objs = [msgobj] endif