From: Paolo Bonzini Date: Mon, 9 Jun 2025 10:58:54 +0000 (+0200) Subject: meson: cleanup win32 library detection X-Git-Tag: v10.1.0-rc0~48^2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a02932b059613f7c4bea273677811561a9237ff;p=thirdparty%2Fqemu.git meson: cleanup win32 library detection As pointed out by Akihiko Odaki, all Win32 libraries in MinGW have lowercase names. This means that on (case-insensitive) Windows you can use the mixed-case names suggested by Microsoft or all-lowercase names, while on Linux you need to make them lowercase. QEMU was already using lowercase names, so there is no need to test the mixed-case name version of libSynchronization. Remove the unnecessary test and while at it make all the tests use "required: true". Signed-off-by: Paolo Bonzini --- diff --git a/meson.build b/meson.build index 34729c2a3dd..ed60be2a2d0 100644 --- a/meson.build +++ b/meson.build @@ -843,15 +843,12 @@ host_dsosuf = '.so' if host_os == 'windows' midl = find_program('midl', required: false) widl = find_program('widl', required: false) - pathcch = cc.find_library('pathcch') - synchronization = cc.find_library('Synchronization', required: false) - if not synchronization.found() - # The library name is lowercase on mingw - synchronization = cc.find_library('synchronization', required: true) - endif - socket = cc.find_library('ws2_32') - winmm = cc.find_library('winmm') + # MinGW uses lowercase for library names + pathcch = cc.find_library('pathcch', required: true) + synchronization = cc.find_library('synchronization', required: true) + socket = cc.find_library('ws2_32', required: true) + winmm = cc.find_library('winmm', required: true) win = import('windows') version_res = win.compile_resources('version.rc',