diff options
-rw-r--r-- | mesonbuild/backend/backends.py | 6 | ||||
-rw-r--r-- | mesonbuild/backend/vs2010backend.py | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index fcb16ee..3a24f30 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -386,7 +386,11 @@ class Backend(): return exe_arr def eval_custom_target_command(self, target, absolute_paths=False): - ofilenames = [os.path.join(self.get_target_dir(target), i) for i in target.output] + if not absolute_paths: + ofilenames = [os.path.join(self.get_target_dir(target), i) for i in target.output] + else: + ofilenames = [os.path.join(self.environment.get_build_dir(), self.get_target_dir(target), i) \ + for i in target.output] srcs = [] outdir = self.get_target_dir(target) # Many external programs fail on empty arguments. diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index 5542a8b..84ef8c3 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -313,10 +313,8 @@ class Vs2010Backend(backends.Backend): (srcs, ofilenames, cmd) = self.eval_custom_target_command(target, True) cmd_templ = '''"%s" '''*len(cmd) ET.SubElement(customstep, 'Command').text = cmd_templ % tuple(cmd) - ET.SubElement(customstep, 'Outputs').text = ';'.join([os.path.join(self.environment.get_build_dir(), i)\ - for i in ofilenames]) - ET.SubElement(customstep, 'Inputs').text = ';'.join([os.path.join(self.environment.get_build_dir(), i) \ - for i in srcs]) + ET.SubElement(customstep, 'Outputs').text = ';'.join(ofilenames) + ET.SubElement(customstep, 'Inputs').text = ';'.join(srcs) ET.SubElement(root, 'Import', Project='$(VCTargetsPath)\Microsoft.Cpp.targets') tree = ET.ElementTree(root) tree.write(ofname, encoding='utf-8', xml_declaration=True) |