<div dir="ltr">Craig, here are some tips from using CMake that might help you get over the "hump".<div><br></div><div>You _first_ need to have a valid CMakeLists.txt file. The simplest file would be:</div><div><br>
</div><div># Start CMakeLists.txt</div><div>project(HelloWorld)</div><div>add_executable(HelloWorld main.cpp)</div><div>#End CMakeLists.txt</div><div><br></div><div>Put that in a folder called "HelloWorld" on you drive.</div>
<div>Then also in that folder create your "main.cpp" source file:</div><div><br></div><div>// --- Start main.cpp</div><div><div><br></div><div>#include <iostream></div><div>int main (int argc, char const *argv[])</div>
<div>{</div><div> std::cout << "HelloWorld" << std::endl;</div><div> return 0;</div><div>}</div><div><br></div><div>Create a Second folder _within_ the "HelloWorld" folder named "Build"</div>
<div><br></div><div>NOW run CMakeSetup.exe.</div><div><br></div><div>Fill in the text fields for "Where are the source files" with C:/Path/to/HelloWorld</div><div>and "Where to build the project" with C:/Path/To/HelloWorld/Build</div>
<div><br></div><div>Click the "Configure" button. Select the "Visual Studio 2005 Project" as the type of project files to generate.</div><div>When the is complete, click the "Generate" button. After that is complete, cmakesetup.exe will quit. Look in the "Build" folder for "HelloWorld.sln" which will be your VS solution file. Open that up and compile and run.. </div>
<div><br></div><div>Let us know if that works.</div><div><br></div><div>Mike Jackson</div><div><a href="http://www.bluequartz.net">www.bluequartz.net</a></div><div><br></div></div><div><br><div class="gmail_quote">On Thu, Aug 28, 2008 at 12:10 AM, Craig Miller <span dir="ltr"><<a href="mailto:craig.miller@spatialminds.com">craig.miller@spatialminds.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p>I've read good things about cmake and would like to
start using it. I spent the afternoon reading the online tutorials and
trying to get a simple hello world c++ project setup and running. I
started with the documentation at <a href="http://www.cmake.org/HTML/Documentation.html" target="_blank">http://www.cmake.org/HTML/Documentation.html</a>
and first followed the "Installing CMake" tutorial which was straight
forward enough. I then tried following the "Running CMake"
tutorial and things started falling apart. There seemed to be a number of
mandatory steps missing from the tutorial. Before I throw in the towel, is
there a recent tutorial that walks through setting up an entire project from
beginning to end using the latest cmake and running under Vista(VS 2005 via
nmake)?</p>
<p> </p>
<p>As I know some will ask, a few of the items that weren't
addressed in the tutorial included:</p>
<p> </p>
<p style="text-indent:-.25in"><span>-<span>
</span></span>Instructions to run the CMakeSetup.exe w/o having first
created the CMakeLists.txt file in the src directory.</p>
<p style="text-indent:-.25in"><span>-<span>
</span></span>No mention that CMake must be run in an environment
where the Visual Studio vcvars.bat has been executed (which isn't likely
if you are running the GUI from the start menu).</p>
<p style="text-indent:-.25in"><span>-<span>
</span></span>No mention of security issues related to Vista.
After attempting to run several programs as Administrator and still failing, I
gave up after spending a fair amount of time w/ google looking for answers.
Vista seems to be introducing the most problems as a result of improved
security. </p>
<p>Any links to recent tutorials would be very appreciated.</p>
<p><br></p>
<p>Thank you.</p>
<p>Craig</p>
</div>
</div>
</blockquote></div><br></div></div>