Index: pylib/gyp/generator/msvs.py |
diff --git a/pylib/gyp/generator/msvs.py b/pylib/gyp/generator/msvs.py |
index 80e3104fd3772860e1d79b275199723ad6830dfe..a1b5612195be9e9edfb1b8877ae7bea296424236 100644 |
--- a/pylib/gyp/generator/msvs.py |
+++ b/pylib/gyp/generator/msvs.py |
@@ -1106,7 +1106,8 @@ def _AddConfigurationToMSVSProject(p, spec, config_type, config_name, config): |
for this configuration. |
""" |
# Get the information for this configuration |
- include_dirs, resource_include_dirs = _GetIncludeDirs(config) |
+ include_dirs, midl_include_dirs, resource_include_dirs = \ |
+ _GetIncludeDirs(config) |
libraries = _GetLibraries(spec) |
library_dirs = _GetLibraryDirs(config) |
out_file, vc_tool, _ = _GetOutputFilePathAndTool(spec, msbuild=False) |
@@ -1134,6 +1135,8 @@ def _AddConfigurationToMSVSProject(p, spec, config_type, config_name, config): |
# Add the information to the appropriate tool |
_ToolAppend(tools, 'VCCLCompilerTool', |
'AdditionalIncludeDirectories', include_dirs) |
+ _ToolAppend(tools, 'VCMIDLTool', |
+ 'AdditionalIncludeDirectories', midl_include_dirs) |
_ToolAppend(tools, 'VCResourceCompilerTool', |
'AdditionalIncludeDirectories', resource_include_dirs) |
# Add in libraries. |
@@ -1189,10 +1192,12 @@ def _GetIncludeDirs(config): |
include_dirs = ( |
config.get('include_dirs', []) + |
config.get('msvs_system_include_dirs', [])) |
+ midl_include_dirs = config.get('midl_include_dirs', []) |
scottmg
2014/09/25 16:53:10
should msvs_system_include_dirs be included here f
Shezan Baig (Bloomberg)
2014/09/25 17:00:21
Hmm, I didn't seem to need it in my test. I can a
scottmg
2014/09/25 17:05:31
I think by default midl uses cl /E, which means it
Shezan Baig (Bloomberg)
2014/09/25 17:15:59
Sounds good -- I've uploaded a new patch. I copie
|
resource_include_dirs = config.get('resource_include_dirs', include_dirs) |
include_dirs = _FixPaths(include_dirs) |
+ midl_include_dirs = _FixPaths(midl_include_dirs) |
resource_include_dirs = _FixPaths(resource_include_dirs) |
- return include_dirs, resource_include_dirs |
+ return include_dirs, midl_include_dirs, resource_include_dirs |
def _GetLibraryDirs(config): |
@@ -2914,7 +2919,8 @@ def _FinalizeMSBuildSettings(spec, configuration): |
converted = True |
msvs_settings = configuration.get('msvs_settings', {}) |
msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(msvs_settings) |
- include_dirs, resource_include_dirs = _GetIncludeDirs(configuration) |
+ include_dirs, midl_include_dirs, resource_include_dirs = \ |
+ _GetIncludeDirs(configuration) |
libraries = _GetLibraries(spec) |
library_dirs = _GetLibraryDirs(configuration) |
out_file, _, msbuild_tool = _GetOutputFilePathAndTool(spec, msbuild=True) |
@@ -2944,6 +2950,8 @@ def _FinalizeMSBuildSettings(spec, configuration): |
# if you don't have any resources. |
_ToolAppend(msbuild_settings, 'ClCompile', |
'AdditionalIncludeDirectories', include_dirs) |
+ _ToolAppend(msbuild_settings, 'Midl', |
+ 'AdditionalIncludeDirectories', midl_include_dirs) |
_ToolAppend(msbuild_settings, 'ResourceCompile', |
'AdditionalIncludeDirectories', resource_include_dirs) |
# Add in libraries, note that even for empty libraries, we want this |