@samitouri / QOSamiQemu / commits / dbf0fcef7e

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 <kkostiuk@redhat.com> Link: https://lore.kernel.org/r/20260330113906.168002-4-kkostiuk@redhat.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Kostiantyn Kostiuk committed Mar 30, 2026 at 14:39 UTC dbf0fcef7ea7718cac8afb39dd9877aa925d77d7
1 file changed +3 -5
qga/meson.build
+3 -5
@@ -105,16 +105,14 @@ endif
105 qga_objs = []
106 if host_os == 'windows'
107 windmc = find_program('windmc', required: true)
108 - windres = find_program('windres', required: true)
108
109 msgrc = custom_target('messages-win32.rc',
110 input: 'messages-win32.mc',
111 output: ['messages-win32.rc', 'MSG00409.bin', 'messages-win32.h'],
112 command: [windmc, '-h', '@OUTDIR@', '-r', '@OUTDIR@', '@INPUT@'])
114 - msgobj = custom_target('messages-win32.o',
115 - input: msgrc[0],
116 - output: 'messages-win32.o',
117 - command: [windres, '-I', '@OUTDIR@', '-o', '@OUTPUT@', '@INPUT@'])
113 +
114 + windows = import('windows')
115 + msgobj = windows.compile_resources(msgrc[0])
116
117 qga_objs = [msgobj]
118 endif