aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/build.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2023-07-31 05:16:39 -0700
committerEli Schwartz <eschwartz93@gmail.com>2023-09-28 14:35:01 -0400
commit5421c24ea02ac50292db51bcab6150bb7e91bf1c (patch)
treee6d8529686557e05de856dc4d7da8983ec1fa606 /mesonbuild/build.py
parentf4ea89be6041b4351d34695f71f9678cc8dd092b (diff)
downloadmeson-5421c24ea02ac50292db51bcab6150bb7e91bf1c.zip
meson-5421c24ea02ac50292db51bcab6150bb7e91bf1c.tar.gz
meson-5421c24ea02ac50292db51bcab6150bb7e91bf1c.tar.bz2
fix using a CustomTargetIndex for vs_module_defs
Because `CustomTargetIndex`es don't have a `subdir` property, but they do implement the `get_subdir()` method
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r--mesonbuild/build.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 7b5cfa7..10f2261 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -2331,13 +2331,13 @@ class SharedLibrary(BuildTarget):
elif isinstance(path, File):
# When passing a generated file.
self.vs_module_defs = path
- elif isinstance(path, CustomTarget):
+ elif isinstance(path, (CustomTarget, CustomTargetIndex)):
# When passing output of a Custom Target
- self.vs_module_defs = File.from_built_file(path.subdir, path.get_filename())
+ self.vs_module_defs = File.from_built_file(path.get_subdir(), path.get_filename())
else:
raise InvalidArguments(
'Shared library vs_module_defs must be either a string, '
- 'a file object or a Custom Target')
+ 'a file object, a Custom Target, or a Custom Target Index')
self.process_link_depends(path)
rust_abi = kwargs.get('rust_abi')