pkgconfig.generate: add FeatureNew and documentation for implict version

The documentation for this change was left out of its implementation in
commit b4aee4675a and was later documented
in commit f831c05b55 as if it had always
existed.
pull/5040/head
Eli Schwartz 6 years ago committed by Jussi Pakkanen
parent e42e19702c
commit 311cbf347b
  1. 2
      docs/markdown/Pkgconfig-module.md
  2. 4
      mesonbuild/modules/pkgconfig.py

@ -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

@ -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)):

Loading…
Cancel
Save