aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/pkgconfig.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-07-02 18:44:36 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-07-02 19:52:53 +0530
commita1d9adba096589122aefc50fb9429ec0ce0432b9 (patch)
tree65711916a354df107ab4022a200855938bacd3a2 /mesonbuild/modules/pkgconfig.py
parent5714ba253467d84b9cd1003b99e6596b5d86f20a (diff)
downloadmeson-a1d9adba096589122aefc50fb9429ec0ce0432b9.zip
meson-a1d9adba096589122aefc50fb9429ec0ce0432b9.tar.gz
meson-a1d9adba096589122aefc50fb9429ec0ce0432b9.tar.bz2
FeatureNew: Make all checks subproject-specific
We now pass the current subproject to every FeatureNew and FeatureDeprecated call. This requires a bunch of rework to: 1. Ensure that we have access to the subproject in the list of arguments when used as a decorator (see _get_callee_args). 2. Pass the subproject to .use() when it's called manually. 3. We also can't do feature checks for new features in meson_options.txt because that's parsed before we know the meson_version from project()
Diffstat (limited to 'mesonbuild/modules/pkgconfig.py')
-rw-r--r--mesonbuild/modules/pkgconfig.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py
index 63d1109..8684864 100644
--- a/mesonbuild/modules/pkgconfig.py
+++ b/mesonbuild/modules/pkgconfig.py
@@ -313,14 +313,14 @@ class PkgConfigModule(ExtensionModule):
'install_dir', 'extra_cflags', 'variables', 'url', 'd_module_versions'})
def generate(self, state, args, kwargs):
if 'variables' in kwargs:
- FeatureNew('custom pkgconfig variables', '0.41.0').use()
+ FeatureNew('custom pkgconfig variables', '0.41.0').use(state.subproject)
default_version = state.project_version['version']
default_install_dir = None
default_description = None
default_name = None
mainlib = None
if len(args) == 1:
- FeatureNew('pkgconfig.generate optional positional argument', '0.46.0').use()
+ 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)):
raise mesonlib.MesonException('Pkgconfig_gen first positional argument must be a library object')