Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(559)

Side by Side Diff: pylib/gyp/msvs_emulation.py

Issue 602073003: Add support for MIDL include directories (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Add msvs_system_include_dirs for msvs_emulation Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pylib/gyp/generator/ninja.py ('k') | test/win/gyptest-midl-includedirs.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 Google Inc. All rights reserved. 1 # Copyright (c) 2012 Google Inc. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """ 5 """
6 This module helps emulate Visual Studio 2008 behavior on top of other 6 This module helps emulate Visual Studio 2008 behavior on top of other
7 build systems, primarily ninja. 7 build systems, primarily ninja.
8 """ 8 """
9 9
10 import os 10 import os
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 311
312 def AdjustIncludeDirs(self, include_dirs, config): 312 def AdjustIncludeDirs(self, include_dirs, config):
313 """Updates include_dirs to expand VS specific paths, and adds the system 313 """Updates include_dirs to expand VS specific paths, and adds the system
314 include dirs used for platform SDK and similar.""" 314 include dirs used for platform SDK and similar."""
315 config = self._TargetConfig(config) 315 config = self._TargetConfig(config)
316 includes = include_dirs + self.msvs_system_include_dirs[config] 316 includes = include_dirs + self.msvs_system_include_dirs[config]
317 includes.extend(self._Setting( 317 includes.extend(self._Setting(
318 ('VCCLCompilerTool', 'AdditionalIncludeDirectories'), config, default=[])) 318 ('VCCLCompilerTool', 'AdditionalIncludeDirectories'), config, default=[]))
319 return [self.ConvertVSMacros(p, config=config) for p in includes] 319 return [self.ConvertVSMacros(p, config=config) for p in includes]
320 320
321 def AdjustMidlIncludeDirs(self, midl_include_dirs, config):
322 """Updates midl_include_dirs to expand VS specific paths, and adds the
323 system include dirs used for platform SDK and similar."""
324 config = self._TargetConfig(config)
325 includes = midl_include_dirs + self.msvs_system_include_dirs[config]
326 includes.extend(self._Setting(
327 ('VCMIDLTool', 'AdditionalIncludeDirectories'), config, default=[]))
328 return [self.ConvertVSMacros(p, config=config) for p in includes]
329
321 def GetComputedDefines(self, config): 330 def GetComputedDefines(self, config):
322 """Returns the set of defines that are injected to the defines list based 331 """Returns the set of defines that are injected to the defines list based
323 on other VS settings.""" 332 on other VS settings."""
324 config = self._TargetConfig(config) 333 config = self._TargetConfig(config)
325 defines = [] 334 defines = []
326 if self._ConfigAttrib(['CharacterSet'], config) == '1': 335 if self._ConfigAttrib(['CharacterSet'], config) == '1':
327 defines.extend(('_UNICODE', 'UNICODE')) 336 defines.extend(('_UNICODE', 'UNICODE'))
328 if self._ConfigAttrib(['CharacterSet'], config) == '2': 337 if self._ConfigAttrib(['CharacterSet'], config) == '2':
329 defines.append('_MBCS') 338 defines.append('_MBCS')
330 defines.extend(self._Setting( 339 defines.extend(self._Setting(
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 1029
1021 # To determine processor word size on Windows, in addition to checking 1030 # To determine processor word size on Windows, in addition to checking
1022 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current 1031 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current
1023 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which 1032 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which
1024 # contains the actual word size of the system when running thru WOW64). 1033 # contains the actual word size of the system when running thru WOW64).
1025 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or 1034 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or
1026 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')): 1035 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')):
1027 default_variables['MSVS_OS_BITS'] = 64 1036 default_variables['MSVS_OS_BITS'] = 64
1028 else: 1037 else:
1029 default_variables['MSVS_OS_BITS'] = 32 1038 default_variables['MSVS_OS_BITS'] = 32
OLDNEW
« no previous file with comments | « pylib/gyp/generator/ninja.py ('k') | test/win/gyptest-midl-includedirs.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698