[CMake] cmake vista tutorial?
    Bill Hoffman 
    bill.hoffman at kitware.com
       
    Wed Sep  3 13:58:20 EDT 2008
    
    
  
Craig Miller wrote:
> I'm running Visual Studio 2005 w/ SP1.
> 
OK, so lets start from the beginning...  Create a very simple project:
---CMakeLists.txt------
cmake_minimum_required (VERSION 2.6)
project(bar)
add_library(foo foo.c)
---------
----foo.c----
int foo()
{
return 1;
}
--------
Put those files in a directory say c:\bar
Now run CMakeSetup
- Select the source directory c:\bar
- Select the binary directory c:\bar-build
- Click Configure
- Select the Visual Studio 8 2005 generator and configure.  This will 
not use nmake but will test your compiler install.
- Do you get any errors?
- Load the bar.sln file from c:\bar-build into visual studio and build
- Do you get errors?
If that all works try nmake:
- Run Start-> All Programs -> Microsoft Visual Studio 2005 -> Visual 
Studio Tools -> Visual Studio 2005 Command Prompt
- From the command line of the prompt you just started run:
   rc /?
   What is the output?
- From the command line of the prompt you just started run:
c:\Program Files\CMake 2.6\bin\CMakeSetup.exe
- Select the source directory c:\bar
- Select the binary directory c:\bar-build-nmake
- Click configure
- Click OK
- run nmake in c:\bar-build-nmake
If that does not work please post errors.  There are lots of folks using 
similar setups as you.  Right now I suspect a bad installation of your 
compiler.  Did you do the default installation?  Or did you customize 
the installation?
-Bill
    
    
More information about the CMake
mailing list