Created
June 17, 2009 03:52
-
-
Save ermaker/131067 to your computer and use it in GitHub Desktop.
set vs env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem use Visual Studio 9 2008 | |
if not "%VS90COMNTOOLS%" == "" ( | |
set ENV_VS_STRING=Visual Studio 9 2008 | |
call "%VS90COMNTOOLS%vsvars32.bat" | |
goto eof | |
) | |
rem use Visual Studio 8 2005 | |
if not "%VS80COMNTOOLS%" == "" ( | |
set ENV_VS_STRING=Visual Studio 8 2005 | |
call "%VS80COMNTOOLS%vsvars32.bat" | |
goto eof | |
) | |
echo [-] Error: No Visual Studio 2005 or 2008 found. | |
:eof |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
call "%~dp0env.bat" | |
mkdir "%~dp0build" 2>NUL | |
set PREV_DIRECTORY="%cd%" | |
cd /D "%~dp0build" | |
cmake .. -G "NMake Makefiles" | |
cd /D %PREV_DIRECTORY% | |
set PREV_DIRECTORY= | |
echo [+] | |
echo [+] | |
echo [+] usage: | |
echo [+] %~dp0build^> nmake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
call "%~dp0env.bat" | |
mkdir "%~dp0build" 2>NUL | |
set PREV_DIRECTORY="%cd%" | |
cd /D "%~dp0build" | |
if not "%ENV_VS_STRING%" == "" ( | |
cmake .. -G "%ENV_VS_STRING%" | |
) else ( | |
echo [-] Trying default version^(Visual Studio 9 2008^)... | |
cmake .. -G "Visual Studio 9 2008" | |
) | |
cd /D %PREV_DIRECTORY% | |
set PREV_DIRECTORY= | |
echo [+] | |
echo [+] | |
echo [+] usage: | |
echo [+] Run with %~dp0build\^<project_name^>.sln |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment