aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-08-27 21:29:57 +0300
committerGitHub <noreply@github.com>2018-08-27 21:29:57 +0300
commit899b0aae9f9afacccfd5963e84df6634e9835b5c (patch)
tree41d7575d4d7c9a825715cd1243de4a129aea933a /docs
parentac07ae7d41e82663c955363e5124404fe9410262 (diff)
parent7fff8318f537400249f191eda373c716e5ba2bee (diff)
downloadmeson-899b0aae9f9afacccfd5963e84df6634e9835b5c.zip
meson-899b0aae9f9afacccfd5963e84df6634e9835b5c.tar.gz
meson-899b0aae9f9afacccfd5963e84df6634e9835b5c.tar.bz2
Merge pull request #4035 from jon-turney/factor-out-version-check
Apply dependency(version:) check for all dependency types
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Reference-manual.md7
-rw-r--r--docs/markdown/snippets/dependency_version.md14
2 files changed, 19 insertions, 2 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 6cf7552..6d2b2da 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -380,11 +380,12 @@ otherwise. This function supports the following keyword arguments:
- `static` tells the dependency provider to try to get static
libraries instead of dynamic ones (note that this is not supported
by all dependency backends)
-- `version`, specifies the required version, a string containing a
+- `version` specifies the required version, a string containing a
comparison operator followed by the version string, examples include
`>1.0.0`, `<=2.3.5` or `3.1.4` for exact matching. (*Added 0.37.0*)
You can also specify multiple restrictions by passing a list to this
keyword argument, such as: `['>=3.14.0', '<=4.1.0']`.
+ These requirements are never met if the version is unknown.
- other
[library-specific](Dependencies.md#dependencies-with-custom-lookup-functionality)
keywords may also be accepted (e.g. `modules` specifies submodules to use for
@@ -1986,7 +1987,9 @@ an external dependency with the following methods:
with `declare_dependency()` and `pkgconfig` for system dependencies
obtained with Pkg-config.
- - `version()` is the version number as a string, for example `1.2.8`
+ - `version()` is the version number as a string, for example `1.2.8`.
+ `unknown` if the dependency provider doesn't support determining the
+ version.
- `partial_dependency(compile_args : false, link_args : false, links
: false, includes : false, source : false)` (*added 0.46.0*) returns
diff --git a/docs/markdown/snippets/dependency_version.md b/docs/markdown/snippets/dependency_version.md
new file mode 100644
index 0000000..4bbf346
--- /dev/null
+++ b/docs/markdown/snippets/dependency_version.md
@@ -0,0 +1,14 @@
+## `dependency(version:)` now applies to all dependency types
+
+Previously, version constraints were only enforced for dependencies found using
+the pkg-config dependency provider. These constraints now apply to dependencies
+found using any dependency provider.
+
+Some combinations of dependency, host and method do not currently support
+discovery of the version. In these cases, the dependency will not be found if a
+version constraint is applied, otherwise the `version()` method for the
+dependency object will return `'unknown'`.
+
+(If discovering the version in one of these combinations is important to you,
+and a method exists to determine the version in that case, please file an issue
+with as much information as possible.)