diff options
author | Matthew Waters <matthew@centricular.com> | 2022-11-22 13:08:06 +1100 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2023-06-08 00:08:26 +0530 |
commit | c6f34b8c40edc55dbc91d77276326ec5d25acaad (patch) | |
tree | 4ba3e95197685ce16ba3cfde7ddb6081ea701e9a | |
parent | 6c480085d5c80815a4c514c1406f1289a05acbb1 (diff) | |
download | meson-c6f34b8c40edc55dbc91d77276326ec5d25acaad.zip meson-c6f34b8c40edc55dbc91d77276326ec5d25acaad.tar.gz meson-c6f34b8c40edc55dbc91d77276326ec5d25acaad.tar.bz2 |
dependencies/qt: add support for Qt frameworks referencing includes in include directory
e.g. QtQml with Qt 6.4.0 referencing QtQmlIntegration is one such example
-rw-r--r-- | mesonbuild/dependencies/qt.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/qt.py b/mesonbuild/dependencies/qt.py index 4dd8bf1..6d31859 100644 --- a/mesonbuild/dependencies/qt.py +++ b/mesonbuild/dependencies/qt.py @@ -105,9 +105,10 @@ def _get_modules_lib_suffix(version: str, info: 'MachineInfo', is_debug: bool) - class QtExtraFrameworkDependency(ExtraFrameworkDependency): - def __init__(self, name: str, env: 'Environment', kwargs: T.Dict[str, T.Any], language: T.Optional[str] = None): + def __init__(self, name: str, env: 'Environment', kwargs: T.Dict[str, T.Any], qvars: T.Dict[str, str], language: T.Optional[str] = None): super().__init__(name, env, kwargs, language=language) self.mod_name = name[2:] + self.qt_extra_include_directory = qvars['QT_INSTALL_HEADERS'] def get_compile_args(self, with_private_headers: bool = False, qt_version: str = "0") -> T.List[str]: if self.found(): @@ -115,6 +116,8 @@ class QtExtraFrameworkDependency(ExtraFrameworkDependency): args = ['-I' + mod_inc_dir] if with_private_headers: args += ['-I' + dirname for dirname in _qt_get_private_includes(mod_inc_dir, self.mod_name, qt_version)] + if self.qt_extra_include_directory: + args += ['-I' + self.qt_extra_include_directory] return args return [] @@ -361,7 +364,7 @@ class QmakeQtDependency(_QtBase, ConfigToolDependency, metaclass=abc.ABCMeta): for m in modules: fname = 'Qt' + m mlog.debug('Looking for qt framework ' + fname) - fwdep = QtExtraFrameworkDependency(fname, self.env, fw_kwargs, language=self.language) + fwdep = QtExtraFrameworkDependency(fname, self.env, fw_kwargs, qvars, language=self.language) if fwdep.found(): self.compile_args.append('-F' + libdir) self.compile_args += fwdep.get_compile_args(with_private_headers=self.private_headers, |