aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin <ria.freelander@gmail.com>2022-07-18 11:17:50 +0300
committerNirbheek Chauhan <nirbheek@centricular.com>2022-08-13 01:51:07 +0530
commit2a978172a87828680985355512b184fa36e0a912 (patch)
treed4df277d4a5991b3c9687fe7141e50aa380e0700
parent988890c8a04e1676664fee1a4d10aad52203e8f5 (diff)
downloadmeson-2a978172a87828680985355512b184fa36e0a912.zip
meson-2a978172a87828680985355512b184fa36e0a912.tar.gz
meson-2a978172a87828680985355512b184fa36e0a912.tar.bz2
qt: fix qt 6 tools detection for pkg-config
Add correct reading of pkgconfig-announced bindir and pkgconfig-announced libexecdir. Will work only on 6.3+
-rw-r--r--mesonbuild/dependencies/qt.py22
1 files changed, 21 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/qt.py b/mesonbuild/dependencies/qt.py
index 562792c..750ae42 100644
--- a/mesonbuild/dependencies/qt.py
+++ b/mesonbuild/dependencies/qt.py
@@ -223,11 +223,18 @@ class QtPkgConfigDependency(_QtBase, PkgConfigDependency, metaclass=abc.ABCMeta)
if prefix:
self.bindir = os.path.join(prefix, 'bin')
+ self.libexecdir = self.get_pkgconfig_host_libexecs(self)
+
@staticmethod
@abc.abstractmethod
def get_pkgconfig_host_bins(core: PkgConfigDependency) -> T.Optional[str]:
pass
+ @staticmethod
+ @abc.abstractmethod
+ def get_pkgconfig_host_libexecs(core: PkgConfigDependency) -> T.Optional[str]:
+ pass
+
@abc.abstractmethod
def get_private_includes(self, mod_inc_dir: str, module: str) -> T.List[str]:
pass
@@ -405,6 +412,10 @@ class Qt4PkgConfigDependency(QtPkgConfigDependency):
def get_private_includes(self, mod_inc_dir: str, module: str) -> T.List[str]:
return []
+ @staticmethod
+ def get_pkgconfig_host_libexecs(core: PkgConfigDependency) -> str:
+ return None
+
class Qt5PkgConfigDependency(QtPkgConfigDependency):
@@ -412,6 +423,10 @@ class Qt5PkgConfigDependency(QtPkgConfigDependency):
def get_pkgconfig_host_bins(core: PkgConfigDependency) -> str:
return core.get_pkgconfig_variable('host_bins', [], None)
+ @staticmethod
+ def get_pkgconfig_host_libexecs(core: PkgConfigDependency) -> str:
+ return None
+
def get_private_includes(self, mod_inc_dir: str, module: str) -> T.List[str]:
return _qt_get_private_includes(mod_inc_dir, module, self.version)
@@ -420,7 +435,12 @@ class Qt6PkgConfigDependency(QtPkgConfigDependency):
@staticmethod
def get_pkgconfig_host_bins(core: PkgConfigDependency) -> str:
- return core.get_pkgconfig_variable('host_bins', [], None)
+ return core.get_pkgconfig_variable('bindir', [], None)
+
+ @staticmethod
+ def get_pkgconfig_host_libexecs(core: PkgConfigDependency) -> str:
+ # Qt6 pkg-config for Qt defines libexecdir from 6.3+
+ return core.get_pkgconfig_variable('libexecdir', [], None)
def get_private_includes(self, mod_inc_dir: str, module: str) -> T.List[str]:
return _qt_get_private_includes(mod_inc_dir, module, self.version)