Bram Moolenaar | 73f4439 | 2017-10-07 18:38:43 +0200 | [diff] [blame] | 1 | @echo off |
| 2 | rem To be used on MS-Windows for Visual C++ 2015 (either Express or Community) |
| 3 | rem See INSTALLpc.txt for information. |
| 4 | rem |
| 5 | rem Usage: |
| 6 | rem For x86 builds run this without options: |
| 7 | rem msvc2015 |
| 8 | rem For x64 builds run this with "x86_amd64" option: |
| 9 | rem msvc2015 x86_amd64 |
Bram Moolenaar | a87f8fd | 2018-09-18 22:58:41 +0200 | [diff] [blame^] | 10 | rem This works on any editions including Express edition. |
| 11 | rem If you use Community (or Professional) edition, you can also use "x64" |
| 12 | rem option: |
| 13 | rem msvc2015 x64 |
Bram Moolenaar | 73f4439 | 2017-10-07 18:38:43 +0200 | [diff] [blame] | 14 | @echo on |
| 15 | |
| 16 | call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" %* |
| 17 | |
| 18 | rem Use Windows SDK 7.1A for targeting Windows XP. |
| 19 | if "%ProgramFiles(x86)%"=="" ( |
| 20 | set "WinSdk71=%ProgramFiles%\Microsoft SDKs\Windows\v7.1A" |
| 21 | ) else ( |
| 22 | set "WinSdk71=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A" |
| 23 | ) |
| 24 | if not exist "%WinSdk71%" ( |
| 25 | echo Windows SDK 7.1A is not found. Targeting Windows Vista and later. |
| 26 | goto :eof |
| 27 | ) |
| 28 | |
| 29 | set INCLUDE=%WinSdk71%\Include;%INCLUDE% |
Bram Moolenaar | a87f8fd | 2018-09-18 22:58:41 +0200 | [diff] [blame^] | 30 | if /i "%Platform%"=="x64" ( |
Bram Moolenaar | 73f4439 | 2017-10-07 18:38:43 +0200 | [diff] [blame] | 31 | set "LIB=%WinSdk71%\Lib\x64;%LIB%" |
| 32 | set SUBSYSTEM_VER=5.02 |
| 33 | ) else ( |
| 34 | set "LIB=%WinSdk71%\Lib;%LIB%" |
| 35 | set SUBSYSTEM_VER=5.01 |
| 36 | ) |
| 37 | set CL=/D_USING_V110_SDK71_ |