diff options
author | FFY00 <filipe.lains@gmail.com> | 2018-06-18 14:11:51 +0100 |
---|---|---|
committer | FFY00 <filipe.lains@gmail.com> | 2018-06-18 14:11:51 +0100 |
commit | dddc1a527a4929baae56a309e7c54c22ca14fb01 (patch) | |
tree | 324c3577be1eb377abb0be24fc6c73a3e1f3fb3e | |
parent | 6738fa58a74b80c3b347ccdfc6dfb9f6856623c9 (diff) | |
download | meson-dddc1a527a4929baae56a309e7c54c22ca14fb01.zip meson-dddc1a527a4929baae56a309e7c54c22ca14fb01.tar.gz meson-dddc1a527a4929baae56a309e7c54c22ca14fb01.tar.bz2 |
dependencies: don't search for dependency with pkgconfig if dub was specified
-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: |