aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies
diff options
context:
space:
mode:
authorKonstantin <ria.freelander@gmail.com>2022-07-18 11:17:50 +0300
committerEli Schwartz <eschwartz@archlinux.org>2022-08-09 23:29:20 -0400
commit49ccf8124aaeda435ec8cd31167418370e36441d (patch)
treef44e61ff9542c990f7ec0bc03c6cdee136fbe9e9 /mesonbuild/dependencies
parent2f079be9965f73e40c3ff1e94cd8eaad20f93767 (diff)
downloadmeson-49ccf8124aaeda435ec8cd31167418370e36441d.zip
meson-49ccf8124aaeda435ec8cd31167418370e36441d.tar.gz
meson-49ccf8124aaeda435ec8cd31167418370e36441d.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+
Diffstat (limited to 'mesonbuild/dependencies')
-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)