[CMake] cmake vista tutorial?
Craig Miller
craig.miller at spatialminds.com
Wed Sep 3 14:39:40 EDT 2008
Forgot to answer the last question... I did a custom compiler installation,
but only so far as selecting whether or not I wanted Visual C++, Visual
Basic, etc. Nothing fancy and nmake, etc all work from the Visual Studio
command prompt (I use them everyday).
Craig
-----Original Message-----
From: Bill Hoffman [mailto:bill.hoffman at kitware.com]
Sent: Wednesday, September 03, 2008 10:58 AM
To: Craig Miller; cmake
Subject: Re: [CMake] cmake vista tutorial?
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