From ec5944fec273a8fded2c4d22db5a63df4b025116 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 18 Jul 2024 15:48:09 -0700 Subject: [PATCH] wip: try to get system dependency working on windows --- mesonbuild/dependencies/dev.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py index 2affd00d2f18..cd34252d4130 100644 --- a/mesonbuild/dependencies/dev.py +++ b/mesonbuild/dependencies/dev.py @@ -558,6 +558,13 @@ def __init__(self, name: str, env: Environment, kwargs: T.Dict[str, T.Any], lang dirs: T.List[T.List[str]] = [[llvm.get_variable(configtool='libdir', cmake='LLVM_LIBRARY_DIR')], []] + # Need the Windows version.dll library for the C++ interface + m = self.env.machines[self.for_machine] + assert m is not None, 'for mypy' + if m.is_windows() and language == 'cpp': + libver = self.clib_compiler.find_library('version', env, []) + self.link_args = libver if libver is not None else [] + # Clang provides up to two interfaces for C++ code, and only one for C # # For C++ you can use libclang-cpp.so, or you can use loose static @@ -587,7 +594,7 @@ def __init__(self, name: str, env: Environment, kwargs: T.Dict[str, T.Any], lang if not self.version_reqs or mesonlib.version_compare_many(version, self.version_reqs): self.version = version - self.link_args = lib + self.link_args.extend(lib) self.is_found = True return