[CMake] looking for Visual Studio installation

Bill Hoffman bill.hoffman at kitware.com
Mon Apr 20 07:53:12 EDT 2009


Piotr Dobrogost wrote:
> Andreas Pokorny wrote:
> 
>> It is not only about finding visual studio but also about configuring
>> cl. If you look into your Visual Studio 2003-2008 folders for
>> *.platform.config xml files. You will find the correct settings for
>> INCLUDE LIB and LIBPATH, and several futher flags required for the
>> respective windows or windows ce platform.
> 
> vsvarsall.bat has hard coded paths and doesn't use any xml files.
> 
>> I also wondered whether it would be possible to set the environment
>> automatically, based on the windows platform selected.
> 
> That what I had in mind too.
> All that is needed is to add some variables to cmake to control if one
> wants to set environment automatically on platforms where it's needed
> and possible.
> 
I hate to be a pain about this but.....

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



More information about the CMake mailing list