| Index: pylib/gyp/generator/msvs.py
|
| diff --git a/pylib/gyp/generator/msvs.py b/pylib/gyp/generator/msvs.py
|
| index bc4dfc31247b735f853eed881c858913169a328e..e60c0256312118fc0c3420a2ef4aec5dadd9adb9 100644
|
| --- a/pylib/gyp/generator/msvs.py
|
| +++ b/pylib/gyp/generator/msvs.py
|
| @@ -257,6 +257,8 @@ def _ToolSetOrAppend(tools, tool_name, setting, value, only_if_unset=False):
|
| if not tools.get(tool_name):
|
| tools[tool_name] = dict()
|
| tool = tools[tool_name]
|
| + if 'CompileAsWinRT' == setting:
|
| + return
|
| if tool.get(setting):
|
| if only_if_unset: return
|
| if type(tool[setting]) == list and type(value) == list:
|
| @@ -286,6 +288,21 @@ def _ConfigFullName(config_name, config_data):
|
| return '%s|%s' % (_ConfigBaseName(config_name, platform_name), platform_name)
|
|
|
|
|
| +def _ConfigWindowsTargetPlatformVersion(config_data):
|
| + ver = config_data.get('msvs_windows_sdk_version')
|
| +
|
| + for key in [r'HKLM\Software\Microsoft\Microsoft SDKs\Windows\%s',
|
| + r'HKLM\Software\Wow6432Node\Microsoft\Microsoft SDKs\Windows\%s']:
|
| + sdk_dir = MSVSVersion._RegistryGetValue(key % ver, 'InstallationFolder')
|
| + if not sdk_dir:
|
| + continue
|
| + version = MSVSVersion._RegistryGetValue(key % ver, 'ProductVersion') or ''
|
| + # Find a matching entry in sdk_dir\include.
|
| + names = sorted([x for x in os.listdir(r'%s\include' % sdk_dir)
|
| + if x.startswith(version)], reverse=True)
|
| + return names[0]
|
| +
|
| +
|
| def _BuildCommandLineForRuleRaw(spec, cmd, cygwin_shell, has_input_path,
|
| quote_cmd, do_setup_env):
|
|
|
| @@ -2676,6 +2693,21 @@ def _GetMSBuildGlobalProperties(spec, guid, gyp_file_name):
|
| else:
|
| properties[0].append(['ApplicationType', 'Windows Store'])
|
|
|
| + platform_name = None
|
| + msvs_windows_sdk_version = None
|
| + for configuration in spec['configurations'].itervalues():
|
| + platform_name = platform_name or _ConfigPlatform(configuration)
|
| + msvs_windows_sdk_version = (msvs_windows_sdk_version or
|
| + _ConfigWindowsTargetPlatformVersion(configuration))
|
| + if platform_name and msvs_windows_sdk_version:
|
| + break
|
| +
|
| + if platform_name == 'ARM':
|
| + properties[0].append(['WindowsSDKDesktopARMSupport', 'true'])
|
| + if msvs_windows_sdk_version:
|
| + properties[0].append(['WindowsTargetPlatformVersion',
|
| + str(msvs_windows_sdk_version)])
|
| +
|
| return properties
|
|
|
| def _GetMSBuildConfigurationDetails(spec, build_file):
|
|
|