Check that link_with arguments in declare_dependency are not external dependencies.

pull/2482/merge
Jussi Pakkanen 7 years ago
parent 57d3ece5fc
commit 12df9c46f5
  1. 4
      mesonbuild/interpreter.py

@ -1579,6 +1579,10 @@ class Interpreter(InterpreterBase):
if not isinstance(d, (dependencies.Dependency, dependencies.ExternalLibrary, dependencies.InternalDependency)):
raise InterpreterException('Dependencies must be external deps')
final_deps.append(d)
for l in libs:
if isinstance(l, dependencies.Dependency):
raise InterpreterException('''Entries in "link_with" may only be self-built targets,
external dependencies (including libraries) must go to "dependencies".''')
dep = dependencies.InternalDependency(version, incs, compile_args,
link_args, libs, sources, final_deps)
return DependencyHolder(dep)

Loading…
Cancel
Save