summaryrefslogtreecommitdiffstats
path: root/test cases/common/246 dependency fallbacks
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/common/246 dependency fallbacks')
-rw-r--r--test cases/common/246 dependency fallbacks/meson.build10
-rw-r--r--test cases/common/246 dependency fallbacks/subprojects/png/meson.build3
2 files changed, 13 insertions, 0 deletions
diff --git a/test cases/common/246 dependency fallbacks/meson.build b/test cases/common/246 dependency fallbacks/meson.build
new file mode 100644
index 0000000..b418088
--- /dev/null
+++ b/test cases/common/246 dependency fallbacks/meson.build
@@ -0,0 +1,10 @@
+project('dependency fallbacks')
+
+# pkg-config has 'libpng' but cmake has 'png' and we have a 'png' subproject
+# for platforms that have neither.
+d = dependency('libpng', 'png', 'foo')
+assert(d.found())
+
+# Check that dependency 'foo' has been implicitly overridden.
+d = dependency('foo')
+assert(d.found())
diff --git a/test cases/common/246 dependency fallbacks/subprojects/png/meson.build b/test cases/common/246 dependency fallbacks/subprojects/png/meson.build
new file mode 100644
index 0000000..5efc60a
--- /dev/null
+++ b/test cases/common/246 dependency fallbacks/subprojects/png/meson.build
@@ -0,0 +1,3 @@
+project('png')
+
+meson.override_dependency('libpng', declare_dependency())