[CMake] Generating makefile from Visual Studio Project (Migrating to Eclipse)

Jesper Eskilson jesper at eskilson.se
Thu Dec 6 02:10:53 EST 2007


Olumide wrote:
> Bill Hoffman wrote:
>>> I'm trying to generate a Unix style (or NMake) Makefile that I can 
>>> use to port my visual studio project to eclipse. I've tried running 
>>> cmake on the project directory with the -G"Unix Makefiles" and 
>>> -G"NMake Makefiles" option, but its not working -- I'm getting lots 
>>> of errors. Apparently, I'm missing a number of variables. How can I 
>>> set these variables? I'd still like to use the Microsoft compiler 
>>> *but* within the eclipse environment.
>>
>> You need to setup the MS compile to work from the command line. The 
>> easy way is to run the visual studio command prompt from the start 
>> menu under  visual studio tools.  Then run cmake from that shell, and 
>> it should work.
> 
> Thanks Bill.
> 
> Do you mean I should start the command prompt and run devenv or 
> something like that? I dont understand what you mean by "run the visual 
> studio command prompt from the start menu under visual studio tools". Am 
> I to launch the command shell from/within visual studio?

The command prompt can be found from your start menu: Start Menu -> All 
Programs -> Microsoft Visual Studio 2005 -> Visual Studio Tools -> 
Visual Studio 2005 Command Prompt.

This will give you a regular windows command prompt with all environment 
variables set up in order for you to be able to run the command-line 
studio tools (cl, nmake, vcbuild, etc.)

-- 
/Jesper




More information about the CMake mailing list