diff options
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r-- | mesonbuild/build.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 4ec742d..267bd16 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -1024,17 +1024,17 @@ This will become a hard error in a future Meson release.''') if isinstance(dep, dependencies.InternalDependency): # Those parts that are internal. self.process_sourcelist(dep.sources) - self.add_include_dirs(dep.include_directories) + self.add_include_dirs(dep.include_directories, dep.get_include_type()) for l in dep.libraries: self.link(l) for l in dep.whole_libraries: self.link_whole(l) - if dep.compile_args or dep.link_args: + if dep.get_compile_args() or dep.get_link_args(): # Those parts that are external. extpart = dependencies.InternalDependency('undefined', [], - dep.compile_args, - dep.link_args, + dep.get_compile_args(), + dep.get_link_args(), [], [], [], []) self.external_deps.append(extpart) # Deps of deps. @@ -1150,7 +1150,7 @@ You probably should put it in link_with instead.''') raise MesonException('File %s does not exist.' % f) self.pch[language] = pchlist - def add_include_dirs(self, args): + def add_include_dirs(self, args, set_is_system: typing.Optional[str] = None): ids = [] for a in args: # FIXME same hack, forcibly unpack from holder. @@ -1159,6 +1159,11 @@ You probably should put it in link_with instead.''') if not isinstance(a, IncludeDirs): raise InvalidArguments('Include directory to be added is not an include directory object.') ids.append(a) + if set_is_system is None: + set_is_system = 'preserve' + if set_is_system != 'preserve': + is_system = set_is_system == 'system' + ids = [IncludeDirs(x.get_curdir(), x.get_incdirs(), is_system, x.get_extra_build_dirs()) for x in ids] self.include_dirs += ids def add_compiler_args(self, language, args): |