anchor.diff:  :VS2010
   TITLE MumbleBuild MSVS2010 (v100)
   SET MUMBLE_VSTOOLSET=v100
  +CALL "%DXSDK_DIR%\Utilities\bin\dx_setenv.cmd" %ARCH% >NUL
  +CALL "%PROGPATH%\Microsoft Visual Studio %VSVER%\VC\vcvarsall.bat" %ARCH% >NUL
   GOTO FINALIZE
   
   :VS2013
   IF %XPCOMPAT%==1 GOTO VS2013XP
   TITLE MumbleBuild MSVC2013 (v120)
   SET MUMBLE_VSTOOLSET=v120
  +CALL "%DXSDK_DIR%\Utilities\bin\dx_setenv.cmd" %ARCH% >NUL
  +CALL "%PROGPATH%\Microsoft Visual Studio %VSVER%\VC\vcvarsall.bat" %ARCH% >NUL
   GOTO FINALIZE
   
   :VS2013XP
   TITLE MumbleBuild MSVS2013 (v120_xp)
   SET MUMBLE_VSTOOLSET=v120_xp
  +CALL "%PROGPATH%\Microsoft Visual Studio %VSVER%\VC\vcvarsall.bat" %ARCH% >NUL
  +:: We call dx_setenv after vcvarsall to avoid accidently using the
  +:: DirectX bundled with MSVC2013's Windows 8 SDK.
  +::
  +:: When building using the v120_xp toolset, the latest supported
  +:: Windows SDK is the Windows v7.1A SDK, which is a specially
  +:: re-packaged version of the Windows 7 SDK meant for use in the
  +:: XP compatibility toolsets for Visual Studio 2012 and 2013
  +:: (i.e. v120_xp).
  +::
  +:: Since the Windows 8 SDK is unsupported, the SDK-bundled DirectX is probably
  +:: also off-limits. To ensure we're using the non-bundled "June 2010" variant,
  +:: we call its dx_setenv.cmd *after* vcvarsall, to ensure the bin, lib and include
  +:: environment variables come before the ones from the Windows 8 SDK.
  +CALL "%DXSDK_DIR%\Utilities\bin\dx_setenv.cmd" %ARCH% >NUL
   :: Set up the environment such that using cl.exe and friends
   :: from the command line will work as if we were using the "v120_xp"
   :: toolset in Visual Studio.
  
positive.code: 
  :amd64host
  SET PROGPATH=%PROGRAMFILES(X86)%
  GOTO SDKVars
  
  :x86host
  SET PROGPATH=%PROGRAMFILES%
  GOTO SDKVars
  
  :SDKVars
  CALL "%PROGPATH%\Microsoft Visual Studio %VSVER%\VC\vcvarsall.bat" %ARCH% >NUL
  
  :: We call dx_setenv after vcvarsall to avoid accidently using the
  :: DirectX bundled with MSVC2013's Windows 8 SDK.
  ::
  :: When building using the v120_xp toolset, the latest supported
  :: Windows SDK is the Windows v7.1A SDK, which is a specially
  :: re-packaged version of the Windows 7 SDK meant for use in the
  :: XP compatibility toolsets for Visual Studio 2012 and 2013
  :: (i.e. v120_xp).
  ::
  :: Since the Windows 8 SDK is unsupported, the SDK-bundled DirectX is probably
  :: also off-limits. To ensure we're using the non-bundled "June 2010" variant,
  :: we call its dx_setenv.cmd *after* vcvarsall, to ensure the bin, lib and include
  :: environment variables come before the ones from the Windows 8 SDK. 
  CALL "%DXSDK_DIR%\Utilities\bin\dx_setenv.cmd" %ARCH% >NUL
  
  IF %VSVER%==10.0 GOTO VS2010
  IF %VSVER%==12.0 GOTO VS2013
  
  
negative.code: :: Technically, this uses a specially re-packaged Windows 7 SDK
  :: called "v7.1A", and sets a preprocessor define, _USING_V110_SDK71_
  :: (it's called V110 for both v110_xp and v120_xp).
  ::set INCLUDE=%PROGPATH%\Microsoft SDKs\Windows\v7.1A\Include;%INCLUDE%
  ::set PATH=%PROGPATH%\Microsoft SDKs\Windows\v7.1A\Bin;%PATH%
  ::set LIB=%PROGPATH%\Microsoft SDKs\Windows\v7.1A\Lib;%LIB%
  set CL=/D_USING_V110_SDK71_ %CL%
  GOTO FINALIZE
  
  :FINALIZE
  SET PATH=%MUMBLE_QT_PREFIX%\bin;%PATH%
  SET PATH=%MUMBLE_OPENSSL_PREFIX%\bin;%PATH%
  SET PATH=%MUMBLE_PROTOBUF_PREFIX%\vsprojects\Release;%PATH%
  if "%ARCH%" == "x86" SET PATH=%MUMBLE_ICE_PREFIX%\bin;%PATH%
  if "%ARCH%" == "amd64" SET PATH=%MUMBLE_ICE_PREFIX%\bin\x64;%PATH%
  cmd /V:ON /K %*
  exit /b
  