diff --git a/mesonbuild/dependencies/cmake.py b/mesonbuild/dependencies/cmake.py index 5386ef9201f5..7e0667496a71 100644 --- a/mesonbuild/dependencies/cmake.py +++ b/mesonbuild/dependencies/cmake.py @@ -22,6 +22,7 @@ import re import os import shutil +import sys import textwrap import typing as T @@ -615,7 +616,7 @@ def _detect_dep(self, name: str, package_version: str, modules: T.List[T.Tuple[s libraries += [j] elif os.path.isabs(j) and os.path.exists(j): libraries += [j] - elif self.env.machines.build.is_windows() and reg_is_maybe_bare_lib.match(j): + elif self.env.machines.build.is_windows() and reg_is_maybe_bare_lib.match(j) and sys.platform.lower() != 'msys': # On Windows, CMake library dependencies can be passed as bare library names, # e.g. 'version' should translate into 'version.lib'. CMake brute-forces a # combination of prefix/suffix combinations to find the right library, however