Index: pylib/gyp/generator/msvs.py |
diff --git a/pylib/gyp/generator/msvs.py b/pylib/gyp/generator/msvs.py |
index 47cbd36ec69c54d0229cf2ad299e7bdf29f30a25..0e62b7926fe265d1b12fb61d0f66ab2caf93a4cd 100644 |
--- a/pylib/gyp/generator/msvs.py |
+++ b/pylib/gyp/generator/msvs.py |
@@ -2612,6 +2612,9 @@ def _GetMSBuildAttributes(spec, config, build_file): |
product_name = spec.get('product_name', '$(ProjectName)') |
target_name = prefix + product_name |
msbuild_attributes['TargetName'] = target_name |
+ if 'TargetExt' not in msbuild_attributes and 'product_extension' in spec: |
+ ext = spec.get('product_extension') |
+ msbuild_attributes['TargetExt'] = '.' + ext |
# Make sure that 'TargetPath' matches 'Lib.OutputFile' or 'Link.OutputFile' |
# (depending on the tool used) to avoid MSB8012 warning. |
@@ -2658,6 +2661,9 @@ def _GetMSBuildConfigurationGlobalProperties(spec, configurations, build_file): |
attributes['OutputDirectory']) |
_AddConditionalProperty(properties, condition, 'TargetName', |
attributes['TargetName']) |
+ if 'TargetExt' in attributes: |
+ _AddConditionalProperty(properties, condition, 'TargetExt', |
+ attributes['TargetExt']) |
if attributes.get('TargetPath'): |
_AddConditionalProperty(properties, condition, 'TargetPath', |