diff options
-rw-r--r-- | docs/markdown/Dependencies.md | 1 | ||||
-rw-r--r-- | mesonbuild/dependencies/base.py | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/docs/markdown/Dependencies.md b/docs/markdown/Dependencies.md index 0a9b5a8..20e356f 100644 --- a/docs/markdown/Dependencies.md +++ b/docs/markdown/Dependencies.md @@ -192,7 +192,6 @@ Use `method` to find dependencies with Dub. Just create a dependency as you woul ```meson urld_dep = dependency('urld', method: 'dub') ``` -If the dependency is not resolved using Dub, meson will still try to find it with Pkg-Config. Please understand that meson is only able to find existing dependencies. You still need to manually fetch and build them with Dub. ``` diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index 86d90d3..9d81742 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -1205,8 +1205,9 @@ def find_external_dependency(name, env, kwargs): raise DependencyException('%s dependency does not accept "language" keyword argument' % (lname, )) if 'dub' == method: dubdep = DubDependency(name, env, kwargs) - if dubdep.found(): - return dubdep + if required and not dubdep.found(): + mlog.log('Dependency', mlog.bold(name), 'found:', mlog.red('NO')) + return dubdep pkg_exc = None pkgdep = None try: |