parameters: (vs_version)
return_statement: return env
docstring: Get a dict of variables mapping internal VS macro names to their gyp
    equivalents. Returns all variables that are independent of the target.
docstring_summary: Get a dict of variables mapping internal VS macro names to their gyp
    equivalents. Returns all variables that are independent of the target.
docstring_tokens: Get a dict of variables mapping internal VS macro names to their gyp equivalents . Returns all variables that are independent of the target .
function: def GetGlobalVSMacroEnv(vs_version):
    """Get a dict of variables mapping internal VS macro names to their gyp
    equivalents. Returns all variables that are independent of the target."""
    env = {}
    # '$(VSInstallDir)' and '$(VCInstallDir)' are available when and only when
    # Visual Studio is actually installed.
    if vs_version.Path():
      env['$(VSInstallDir)'] = vs_version.Path()
      env['$(VCInstallDir)'] = os.path.join(vs_version.Path(), 'VC') + '\\'
    # Chromium uses DXSDK_DIR in include/lib paths, but it may or may not be
    # set. This happens when the SDK is sync'd via src-internal, rather than
    # by typical end-user installation of the SDK. If it's not set, we don't
    # want to leave the unexpanded variable in the path, so simply strip it.
    dxsdk_dir = _FindDirectXInstallation()
    env['$(DXSDK_DIR)'] = dxsdk_dir if dxsdk_dir else ''
    # Try to find an installation location for the Windows DDK by checking
    # the WDK_DIR environment variable, may be None.
    env['$(WDK_DIR)'] = os.environ.get('WDK_DIR', '')
    return env
function_tokens: def GetGlobalVSMacroEnv ( vs_version ) : env = { } # '$(VSInstallDir)' and '$(VCInstallDir)' are available when and only when # Visual Studio is actually installed. if vs_version . Path ( ) : env [ '$(VSInstallDir)' ] = vs_version . Path ( ) env [ '$(VCInstallDir)' ] = os . path . join ( vs_version . Path ( ) , 'VC' ) + '\\' # Chromium uses DXSDK_DIR in include/lib paths, but it may or may not be # set. This happens when the SDK is sync'd via src-internal, rather than # by typical end-user installation of the SDK. If it's not set, we don't # want to leave the unexpanded variable in the path, so simply strip it. dxsdk_dir = _FindDirectXInstallation ( ) env [ '$(DXSDK_DIR)' ] = dxsdk_dir if dxsdk_dir else '' # Try to find an installation location for the Windows DDK by checking # the WDK_DIR environment variable, may be None. env [ '$(WDK_DIR)' ] = os . environ . get ( 'WDK_DIR' , '' ) return env