aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-07-01 14:43:51 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-07-01 20:50:47 +0530
commitf54e07bcd842a1a4803b8c62ce8844e0474a2418 (patch)
tree667b9cc1aced279331878b2136a455f056991bc3
parent23d29ffb1404f7111a2ed5713a03f91068d41ea9 (diff)
downloadmeson-f54e07bcd842a1a4803b8c62ce8844e0474a2418.zip
meson-f54e07bcd842a1a4803b8c62ce8844e0474a2418.tar.gz
meson-f54e07bcd842a1a4803b8c62ce8844e0474a2418.tar.bz2
vs: Fix the path of customtarget generated sources
The path is relative to the vcxproj file, not relative to the build root
-rw-r--r--mesonbuild/backend/vs2010backend.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index 5684d8d..4be9817 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -97,9 +97,14 @@ class Vs2010Backend(backends.Backend):
outputs = []
custom_target_include_dirs = []
custom_target_output_files = []
+ target_private_dir = self.relpath(self.get_target_private_dir(target), self.get_target_dir(target))
+ down = self.target_to_build_root(target)
for genlist in target.get_generated_sources():
if isinstance(genlist, build.CustomTarget):
- custom_target_output_files += [os.path.join(self.get_target_dir(genlist), i) for i in genlist.output]
+ for i in genlist.output:
+ # Path to the generated source from the current vcxproj dir via the build root
+ ipath = os.path.join(down, self.get_target_dir(genlist), i)
+ custom_target_output_files.append(ipath)
idir = self.relpath(self.get_target_dir(genlist), self.get_target_dir(target))
if idir not in custom_target_include_dirs:
custom_target_include_dirs.append(idir)
@@ -110,7 +115,6 @@ class Vs2010Backend(backends.Backend):
outfilelist = genlist.get_outfilelist()
exe_arr = self.exe_object_to_cmd_array(exe)
base_args = generator.get_arglist()
- target_private_dir = self.relpath(self.get_target_private_dir(target), self.get_target_dir(target))
for i in range(len(infilelist)):
if len(infilelist) == len(outfilelist):
sole_output = os.path.join(target_private_dir, outfilelist[i])