diff options
author | Nicolas Schneider <nioncode+git@gmail.com> | 2019-01-26 23:37:00 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-02-21 23:07:18 +0200 |
commit | 76db75328689a7e48ea5862edd333e6f30c681bb (patch) | |
tree | d93b696a7f491cb621d993149360fe016c3c9175 | |
parent | f85a71605d58e9b665e72ca43a60f0d04194a5e9 (diff) | |
download | meson-76db75328689a7e48ea5862edd333e6f30c681bb.zip meson-76db75328689a7e48ea5862edd333e6f30c681bb.tar.gz meson-76db75328689a7e48ea5862edd333e6f30c681bb.tar.bz2 |
vs: use CustomBuild instead of CustomBuildStep for custom targets
This allows to view the build step in VS and reuses the same concept that
we use for run targets instead of maintaining two different behaviors.
-rw-r--r-- | mesonbuild/backend/vs2010backend.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index f25a2a6..8827f20 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -531,8 +531,6 @@ class Vs2010Backend(backends.Backend): def gen_custom_target_vcxproj(self, target, ofname, guid): root = self.create_basic_crap(target, guid) - action = ET.SubElement(root, 'ItemDefinitionGroup') - customstep = ET.SubElement(action, 'CustomBuildStep') # We need to always use absolute paths because our invocation is always # from the target dir, not the build root. target.absolute_paths = True @@ -549,9 +547,8 @@ class Vs2010Backend(backends.Backend): extra_paths=extra_paths, capture=ofilenames[0] if target.capture else None) wrapper_cmd = self.environment.get_build_command() + ['--internal', 'exe', exe_data] - ET.SubElement(customstep, 'Command').text = ' '.join(self.quote_arguments(wrapper_cmd)) - ET.SubElement(customstep, 'Outputs').text = ';'.join(ofilenames) - ET.SubElement(customstep, 'Inputs').text = ';'.join([exe_data] + srcs + depend_files) + self.add_custom_build(root, 'custom_target', ' '.join(self.quote_arguments(wrapper_cmd)), + deps=[exe_data] + srcs + depend_files, outputs=ofilenames) ET.SubElement(root, 'Import', Project=r'$(VCTargetsPath)\Microsoft.Cpp.targets') self.generate_custom_generator_commands(target, root) self.add_regen_dependency(root) |