summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-06-09 12:58:54 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2025-06-17 09:54:51 +0200
commit9a02932b059613f7c4bea273677811561a9237ff (patch)
tree178807ded01ef049fbcaedffacb259678aa42662
parenta6f02277595136832c9e9bcaf447ab574f7b1128 (diff)
downloadfocaccia-qemu-9a02932b059613f7c4bea273677811561a9237ff.tar.gz
focaccia-qemu-9a02932b059613f7c4bea273677811561a9237ff.zip
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 <pbonzini@redhat.com>
-rw-r--r--meson.build13
1 files changed, 5 insertions, 8 deletions
diff --git a/meson.build b/meson.build
index 34729c2a3d..ed60be2a2d 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',