aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/cmake.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/modules/cmake.py')
-rw-r--r--mesonbuild/modules/cmake.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/modules/cmake.py b/mesonbuild/modules/cmake.py
index c390b01..cc259dc 100644
--- a/mesonbuild/modules/cmake.py
+++ b/mesonbuild/modules/cmake.py
@@ -109,6 +109,8 @@ class CMakeSubproject(ModuleObject):
@stringArgs
def dependency(self, state, args, kwargs):
info = self._args_to_info(args)
+ if info['func'] == 'executable':
+ raise InvalidArguments(f'{args[0]} is an executable and does not support the dependency() method. Use target() instead.')
orig = self.get_variable(state, [info['dep']], {})
assert isinstance(orig, dependencies.Dependency)
actual = orig.include_type