diff options
author | Charles Brunet <charles.brunet@optelgroup.com> | 2023-09-05 13:51:18 -0400 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2023-09-06 16:56:43 +0530 |
commit | 84466b735986c9f548899f7e7669be782de091e8 (patch) | |
tree | f499cc5575cc865f5541475e4bd28b0e45bc10e6 /mesonbuild | |
parent | 599f37eb5611707b2e32e5f6d1e12f6c609dde52 (diff) | |
download | meson-84466b735986c9f548899f7e7669be782de091e8.zip meson-84466b735986c9f548899f7e7669be782de091e8.tar.gz meson-84466b735986c9f548899f7e7669be782de091e8.tar.bz2 |
qt module: add include_directories to moc compile
Fixes #12182
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/modules/qt.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/modules/qt.py b/mesonbuild/modules/qt.py index d5c3273..83dcf31 100644 --- a/mesonbuild/modules/qt.py +++ b/mesonbuild/modules/qt.py @@ -23,7 +23,7 @@ from . import ModuleReturnValue, ExtensionModule from .. import build from .. import coredata from .. import mlog -from ..dependencies import find_external_dependency, Dependency, ExternalLibrary +from ..dependencies import find_external_dependency, Dependency, ExternalLibrary, InternalDependency from ..mesonlib import MesonException, File, version_compare, Popen_safe from ..interpreter import extract_required_kwarg from ..interpreter.type_checking import INSTALL_DIR_KW, INSTALL_KW, NoneType @@ -457,7 +457,10 @@ class QtBaseModule(ExtensionModule): inc = state.get_include_args(include_dirs=kwargs['include_directories']) compile_args: T.List[str] = [] for dep in kwargs['dependencies']: - compile_args.extend([a for a in dep.get_all_compile_args() if a.startswith(('-I', '-D'))]) + compile_args.extend(a for a in dep.get_all_compile_args() if a.startswith(('-I', '-D'))) + if isinstance(dep, InternalDependency): + for incl in dep.include_directories: + compile_args.extend(f'-I{i}' for i in incl.to_string_list(self.interpreter.source_root, self.interpreter.environment.build_dir)) output: T.List[build.GeneratedList] = [] |