[CMake] looking for Visual Studio installation

Bill Hoffman bill.hoffman at kitware.com
Mon Apr 20 08:01:48 EDT 2009


Bill Hoffman wrote:

> I am not sure I want to support something like this.  Even if CMake 
> picked the right vsvars and setup the environment when cmake-gui was 
> running, the user would have to know how to run vsvars.bat to run nmake 
> at the end of the day.  Maybe the answer is to create a .bat file that 
> runs vsvars.bat and cmake-gui.exe and create a short cut to that.  You 
> could put that on the desktop and it should work.
> 
> -Bill
> 
> 

I just tried and it works great, just create a .bat file 
nmake-cmake-gui.bat with contents like this:

call "c:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86
"C:\Program Files\CMake 2.6\bin\cmake-gui.exe"


Then create a short cut to run that, and you can click on that .bat file 
to start a cmake-gui that will have the correct env.

-Bill



More information about the CMake mailing list