diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2019-03-06 18:08:23 -0500 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-03-09 19:39:51 +0200 |
commit | 311cbf347b825a6461421dbad592fbe436b1d6cb (patch) | |
tree | 1ef99e9f120c4a6121e51c8877d3e686c29351e9 | |
parent | e42e19702cc326c2db19e5fcd5e6a257f1f5f8a9 (diff) | |
download | meson-311cbf347b825a6461421dbad592fbe436b1d6cb.zip meson-311cbf347b825a6461421dbad592fbe436b1d6cb.tar.gz meson-311cbf347b825a6461421dbad592fbe436b1d6cb.tar.bz2 |
pkgconfig.generate: add FeatureNew and documentation for implict version
The documentation for this change was left out of its implementation in
commit b4aee4675afd9f9f4a36aea628bab4249d7addbc and was later documented
in commit f831c05b553d876a08dcf46478161b60b4e693c4 as if it had always
existed.
-rw-r--r-- | docs/markdown/Pkgconfig-module.md | 2 | ||||
-rw-r--r-- | mesonbuild/modules/pkgconfig.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/docs/markdown/Pkgconfig-module.md b/docs/markdown/Pkgconfig-module.md index 7e93524..da18957 100644 --- a/docs/markdown/Pkgconfig-module.md +++ b/docs/markdown/Pkgconfig-module.md @@ -51,7 +51,7 @@ keyword arguments. e.g. `datadir=${prefix}/share`. The names `prefix`, `libdir` and `installdir` are reserved and may not be used. - `version` a string describing the version of this library, used to set the - `Version:` field. Defaults to the project version if unspecified. + `Version:` field. (*since 0.46.0*) Defaults to the project version if unspecified. - `d_module_versions` a list of module version flags used when compiling D sources referred to by this pkg-config file diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py index 8ce28ba..2f8b533 100644 --- a/mesonbuild/modules/pkgconfig.py +++ b/mesonbuild/modules/pkgconfig.py @@ -353,7 +353,9 @@ class PkgConfigModule(ExtensionModule): default_description = None default_name = None mainlib = None - if len(args) == 1: + if not args and 'version' not in kwargs: + FeatureNew('pkgconfig.generate implicit version keyword', '0.46.0').use(state.subproject) + elif len(args) == 1: FeatureNew('pkgconfig.generate optional positional argument', '0.46.0').use(state.subproject) mainlib = getattr(args[0], 'held_object', args[0]) if not isinstance(mainlib, (build.StaticLibrary, build.SharedLibrary)): |