aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/build.py2
-rw-r--r--test cases/common/171 not-found dependency/meson.build5
-rw-r--r--test cases/common/171 not-found dependency/sub/meson.build1
-rw-r--r--test cases/common/171 not-found dependency/testlib.c0
4 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 4a35bec..8a2e716 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -839,7 +839,7 @@ This will become a hard error in a future Meson release.''')
self.external_deps.append(extpart)
# Deps of deps.
self.add_deps(dep.ext_deps)
- elif isinstance(dep, dependencies.ExternalDependency):
+ elif isinstance(dep, dependencies.Dependency):
self.external_deps.append(dep)
self.process_sourcelist(dep.get_sources())
elif isinstance(dep, BuildTarget):
diff --git a/test cases/common/171 not-found dependency/meson.build b/test cases/common/171 not-found dependency/meson.build
index 7d92f5a..85505ee 100644
--- a/test cases/common/171 not-found dependency/meson.build
+++ b/test cases/common/171 not-found dependency/meson.build
@@ -1,4 +1,4 @@
-project('dep-test')
+project('dep-test', 'c')
dep = dependency('', required:false)
if dep.found()
@@ -6,3 +6,6 @@ if dep.found()
endif
assert(dep.type_name() == 'not-found', 'dependency should be of type "not-found" not ' + dep.type_name())
+
+library('testlib', 'testlib.c', dependencies: [dep])
+subdir('sub', if_found: dep)
diff --git a/test cases/common/171 not-found dependency/sub/meson.build b/test cases/common/171 not-found dependency/sub/meson.build
new file mode 100644
index 0000000..2a33cae
--- /dev/null
+++ b/test cases/common/171 not-found dependency/sub/meson.build
@@ -0,0 +1 @@
+error('should be disabled by subdir(if_found:)')
diff --git a/test cases/common/171 not-found dependency/testlib.c b/test cases/common/171 not-found dependency/testlib.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test cases/common/171 not-found dependency/testlib.c