aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-04-10 22:22:02 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2021-04-11 23:59:22 +0300
commit9dfd53dc404c5c2485c11343516135bb3e983e23 (patch)
treedc77a05fdfd8d671e6c24c1da9c0453e126ce747 /mesonbuild/backend/backends.py
parentbe3efaf1d55b3d0f43aa8a06b23d31364c683029 (diff)
downloadmeson-9dfd53dc404c5c2485c11343516135bb3e983e23.zip
meson-9dfd53dc404c5c2485c11343516135bb3e983e23.tar.gz
meson-9dfd53dc404c5c2485c11343516135bb3e983e23.tar.bz2
Xcode: fix setting up inlude args for source and build dirs.
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py8
1 files changed, 6 insertions, 2 deletions
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):