summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/markdown/CMake-module.md4
-rw-r--r--mesonbuild/modules/cmake.py5
2 files changed, 5 insertions, 4 deletions
diff --git a/docs/markdown/CMake-module.md b/docs/markdown/CMake-module.md
index f8275c981..982fa35d0 100644
--- a/docs/markdown/CMake-module.md
+++ b/docs/markdown/CMake-module.md
@@ -138,8 +138,8 @@ and supports the following methods:
`include_type` kwarg *(new in 0.56.0)* controls the include type of the
returned dependency object similar to the same kwarg in the
[[dependency]] function.
- - `include_directories(target)` returns a Meson [[@inc]]
- object for the specified target. Using this method is not necessary
+ - `include_directories(target)` returns an array of Meson [[@inc]]
+ objects for the specified target. Using this method is not necessary
if the dependency object is used.
- `target(target)` returns the raw build target.
- `target_type(target)` returns the type of the target as a string
diff --git a/mesonbuild/modules/cmake.py b/mesonbuild/modules/cmake.py
index e3154b05e..f12cc51a6 100644
--- a/mesonbuild/modules/cmake.py
+++ b/mesonbuild/modules/cmake.py
@@ -154,10 +154,11 @@ class CMakeSubproject(ModuleObject):
@noKwargs
@typed_pos_args('cmake.subproject.include_directories', str)
- def include_directories(self, state: ModuleState, args: T.Tuple[str], kwargs: TYPE_kwargs) -> build.IncludeDirs:
+ def include_directories(self, state: ModuleState, args: T.Tuple[str], kwargs: TYPE_kwargs) -> T.List[build.IncludeDirs]:
info = self._args_to_info(args[0])
inc = self.get_variable(state, [info['inc']], kwargs)
- assert isinstance(inc, build.IncludeDirs), 'for mypy'
+ assert isinstance(inc, list), 'for mypy'
+ assert isinstance(inc[0], build.IncludeDirs), 'for mypy'
return inc
@noKwargs