summaryrefslogtreecommitdiff
path: root/mesonbuild/modules/pkgconfig.py
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2023-06-13 12:57:41 -0400
committerXavier Claessens <xavier.claessens@collabora.com>2024-02-26 10:03:51 -0500
commit5654f03450e6ed0745a9429e578344dd4e581fc9 (patch)
treef825b89658ca888dd8b0ff449d5999c0999c6a95 /mesonbuild/modules/pkgconfig.py
parent42944f72a438ea746dc6484b57bb0ffe429ea79f (diff)
downloadmeson-5654f03450e6ed0745a9429e578344dd4e581fc9.tar.gz
interpreter: Dependency variables can be empty string
There is no reason to forbid empty variables, PkgConfigCLI.variable() even has code specifically for handling that case.
Diffstat (limited to 'mesonbuild/modules/pkgconfig.py')
-rw-r--r--mesonbuild/modules/pkgconfig.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py
index 3f9ce7b71..ebe0d92d5 100644
--- a/mesonbuild/modules/pkgconfig.py
+++ b/mesonbuild/modules/pkgconfig.py
@@ -680,6 +680,8 @@ class PkgConfigModule(NewExtensionModule):
reserved = ['prefix', 'libdir', 'includedir']
variables = []
for name, value in vardict.items():
+ if not value:
+ FeatureNew.single_use('empty variable value in pkg.generate', '1.4.0', state.subproject, location=state.current_node)
if not dataonly and name in reserved:
raise mesonlib.MesonException(f'Variable "{name}" is reserved')
variables.append((name, value))