aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Schneider <nioncode+git@gmail.com>2016-03-29 01:02:15 +0200
committerNicolas Schneider <nioncode+git@gmail.com>2016-03-29 11:50:50 +0200
commit30e2a5feae6a4b8fd9106e6376e07e168d0af52e (patch)
treed8442764eb13357ec950ac51c13bf5ef62be9abe
parent37d74736156e3146df5945f259fc71e959ca5dd2 (diff)
downloadmeson-30e2a5feae6a4b8fd9106e6376e07e168d0af52e.zip
meson-30e2a5feae6a4b8fd9106e6376e07e168d0af52e.tar.gz
meson-30e2a5feae6a4b8fd9106e6376e07e168d0af52e.tar.bz2
vs2010: fix include directories
Everything in the VS project file is relative to the project file itself. The project file gets put in the target.subdir, so to include files from there we just need to use '.'. To include from the private dir, we need to use the relative path from the target dir to the target private dir.
-rw-r--r--mesonbuild/backend/vs2010backend.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index ec10d4c..f06f5f6 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -421,11 +421,8 @@ class Vs2010Backend(backends.Backend):
clconf = ET.SubElement(compiles, 'ClCompile')
opt = ET.SubElement(clconf, 'Optimization')
opt.text = 'disabled'
- inc_dirs = [proj_to_src_dir, self.get_target_private_dir(target)]
- cur_dir = target.subdir
- if cur_dir == '':
- cur_dir= '.'
- inc_dirs.append(cur_dir)
+ inc_dirs = ['.', self.relpath(self.get_target_private_dir(target), self.get_target_dir(target)),
+ proj_to_src_dir]
extra_args = {'c': [], 'cpp': []}
for l, args in self.environment.coredata.external_args.items():