From bc2305e1ac044e338fa51f26041914f65184b737 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 9 Aug 2022 23:23:37 -0400 Subject: [PATCH] dependencies: reject Qt6 pkg-config dependency if libexecdir is not known This is needed for 6.1 support as noted in commit a606ce22eb0dd05eef56384d59954edad7da131d but at the time there was no pkg-config detection method at all. The stub code for Qt6 didn't support libexecdir at all, and the pkg-config files added to newer versions of Qt6 didn't export that information either until a further bugfix release. Enforce that this information is required. --- mesonbuild/dependencies/qt.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mesonbuild/dependencies/qt.py b/mesonbuild/dependencies/qt.py index 750ae42a9402..ea8b849d1830 100644 --- a/mesonbuild/dependencies/qt.py +++ b/mesonbuild/dependencies/qt.py @@ -433,6 +433,13 @@ def get_private_includes(self, mod_inc_dir: str, module: str) -> T.List[str]: class Qt6PkgConfigDependency(QtPkgConfigDependency): + def __init__(self, name: str, env: 'Environment', kwargs: T.Dict[str, T.Any]): + super().__init__(name, env, kwargs) + if not self.libexecdir: + mlog.debug(f'detected Qt6 {self.version} pkg-config dependency does not ' + 'have proper tools support, ignoring') + self.is_found = False + @staticmethod def get_pkgconfig_host_bins(core: PkgConfigDependency) -> str: return core.get_pkgconfig_variable('bindir', [], None)