From 9226a92fe0111bf84bdad0964e0381c31e5a2379 Mon Sep 17 00:00:00 2001 From: Jeff Moguillansky Date: Thu, 4 Feb 2021 10:07:12 -0800 Subject: xcode-backend: add implicit includes Move helper functions get_source_dir_include_args and get_build_dir_include_args to backend base class --- mesonbuild/backend/backends.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mesonbuild/backend/backends.py') diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index badc2d0..f95ca4d 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -248,6 +248,17 @@ class Backend: return self.environment.coredata.validate_option_value(option_name, override) return self.environment.coredata.get_option(option_name.evolve(subproject=target.subproject)) + def get_source_dir_include_args(self, target, compiler): + curdir = target.get_subdir() + tmppath = os.path.normpath(os.path.join(self.build_to_src, curdir)) + return compiler.get_include_args(tmppath, False) + + def get_build_dir_include_args(self, target, compiler): + curdir = target.get_subdir() + if curdir == '': + curdir = '.' + return compiler.get_include_args(curdir, False) + def get_target_filename_for_linking(self, target): # On some platforms (msvc for instance), the file that is used for # dynamic linking is not the same as the dynamic library itself. This -- cgit v1.1