aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/dependencies/cmake.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/mesonbuild/dependencies/cmake.py b/mesonbuild/dependencies/cmake.py
index 5386ef9..1b5e2f0 100644
--- a/mesonbuild/dependencies/cmake.py
+++ b/mesonbuild/dependencies/cmake.py
@@ -617,12 +617,10 @@ class CMakeDependency(ExternalDependency):
libraries += [j]
elif self.env.machines.build.is_windows() and reg_is_maybe_bare_lib.match(j):
# 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
- # as we do not have a compiler environment available to us, we cannot do the
- # same, but must assume any bare argument passed which is not also a CMake
- # target must be a system library we should try to link against
- libraries += [f"{j}.lib"]
+ # CMake brute-forces a combination of prefix/suffix combinations to find the
+ # right library. Assume any bare argument passed which is not also a CMake
+ # target must be a system library we should try to link against.
+ libraries += self.clib_compiler.find_library(j, self.env, [])
else:
mlog.warning('CMake: Dependency', mlog.bold(j), 'for', mlog.bold(name), 'target', mlog.bold(self._original_module_name(curr)), 'was not found')