From 9dfd53dc404c5c2485c11343516135bb3e983e23 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sat, 10 Apr 2021 22:22:02 +0300 Subject: Xcode: fix setting up inlude args for source and build dirs. --- mesonbuild/backend/backends.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mesonbuild/backend/backends.py') diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index f595e09..3482f3d 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -262,9 +262,13 @@ 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): + def get_source_dir_include_args(self, target, compiler, *, absolute_path=False): curdir = target.get_subdir() - tmppath = os.path.normpath(os.path.join(self.build_to_src, curdir)) + if absolute_path: + lead = self.source_dir + else: + lead = self.build_to_src + tmppath = os.path.normpath(os.path.join(lead, curdir)) return compiler.get_include_args(tmppath, False) def get_build_dir_include_args(self, target, compiler, *, absolute_path=False): -- cgit v1.1