[Insight-developers] Sample Insight project that builds
outside of the Insight source tree
William A. Hoffman
bill.hoffman@kitware.com
Mon, 28 May 2001 13:19:09 -0400
The sample project works fine in a unix environment with no changes.
Here is how to use it:
1. build cmake
2. cd Insight/Examples/SampleProject
// Run the cmake command in the SampleProject directory with "." as an
argument.
// Could also do an out of source build with the cmake command.
/full/path/to/cmake/cmake .
3. Edit CMakeCache.txt and set the Insight binary directory, it will be
NOTFOUND
4. type make
-Bill
At 10:55 PM 5/24/2001 -0400, Miller, James V (CRD) wrote:
>I checked in a project (Insight/Examples/SampleProject) that can be built
>outside of Insight's source
>tree using CMake. Currently, it only supports Windows. I have not grokked
>how to set up a Unix build
>like this yet (I think I need a small configure script).
>
>To use this project:
>
>Copy the SampleProject to somewhere outside of your Insight source tree.
>Run a copy of CMakeSetup.
>The copy from Insight will work fine if you've updated CMake today or
>yesterday. (When you run
>Insight's version of CMakeSetup, it will show the values from Insight
>(from your last build). Once
>you change the source directory and build directory to SampleProject,
>those values will be replaced.)
>Set the source directory to SampleProject and the binary project to
>SampleProject-vc. When you build
>the project files, only three or four cache values will appear. The
>ITK_BINARY_DIR will be
>NOTFOUND. Change this cache value to point to your Insight build tree.
>Rebuild the project files.
>All the cached values from your Insight build configuration will now appear.
>
>You can now load SampleProject-vc/SampleProject.dsw into Visual Studio and
>build it.
>
>For the interested:
>
>I broke Insight's CMakeLists.txt file into two files. The second file is
>itkCMakeOptions.cmake.
>This file has the include and link directories. SampleProject's
>CMakeLists.txt file loads
>itkCMakeOptions.cmake as well as itk's CMakeCache. Thus, SampleProject
>will build with all the same
>options as Insight was built with.
>
>Note: don't be tempted to modify the cache values loaded into
>SampleProject from Insight. Your edits
>will be lost once the project file is built. On building the project
>files, Insight's cache is
>reloaded into SampleProject to ensure that SampleProject builds with all
>the same options as Insight.
>
>_______________________________________________
>Insight-developers mailing list
>Insight-developers@public.kitware.com
>http://public.kitware.com/mailman/listinfo/insight-developers