[Insight-users] CMake: ITK-DIR

Luis Ibanez luis . ibanez at kitware . com
Tue, 24 Jun 2003 18:40:07 -0400


Hi Tejas,


Please take some time for reading the installation instructions
provided in the SoftwareGuide

       http://www . itk . org/ItkSoftwareGuide . pdf

Chapter 2.

The HelloWorld example is described there in detail.


----------------

Since the binary directory that you provided 
for building ITK was

   c:\InsightToolkit-1.2.0\Examples\Installation

You should now find there a file  named


    ITK.dsw

Open this file with VC++, and build the toolkit.

When the build is done you should find a number
of libraries in

   c:\InsightToolkit-1.2.0\Examples\Installation\bin\Debug

(or ... \bin\Release).
Among those libraries you should see ITKCommon.lib
ITKIO.lib....  for example.

Once you are done with building the ITK libraries,
 you can then go and configure and build your application.
In this case, the HelloWorld example:

1)  copy the HelloWorld example in an external directory "XYZ",

2)  run CMAke and provide the source directory "XYZ" where
     you copied the HelloWorld example.  Select a binary directory
    where you want the HelloWorld example to be built. (this is
   different from the ITK-DIR directory).

3) fill in the CMAke variable ITK-DIR with
   
      c:\InsightToolkit-1.2.0\Examples\Installation

4) click Configure and then click Ok

5) Go to the binary directory that you selected for building the
   HelloWorld example, and open the .dsw with VC++

6) Build it.

------------

Regards,


    Luis


----------------------
tejas mehta wrote:

> Hi Luis
> Thank you for your reply. I am still unsure about how to open the ITK 
> Workspace and build the toolkit. Do I open the helloworld.cxx file in 
> VC++ and try to build it ?
>  
> Tejas
>
> */Luis Ibanez <luis . ibanez at kitware . com>/* wrote:
>
>
>     Hi Tejas,
>
>     The ITK-DIR variable should point to
>     the binary directory where you built ITK.
>
>     When you ran CMake, the first thing you do
>     is to provide a 'Source' directory and a
>     'Binary' directory. The 'Binary' directory
>     is where the toolkit will be built.
>     Then you open the ITK workspace with
>     VisualStudio (it looks like you are doing
>     this on windows..) and build the toolkit.
>
>     This same ITK 'Binary' directory is the one
>     you should provide for the ITK-DIR variable
>     in CMake when you configure an applications
>     that uses ITK. (e.g. the "Hellow World" example).
>
>
>     Regards,.
>
>
>     Luis
>
>
>     ---------------------------------
>     tejas mehta wrote:
>
>     > Hi,
>     >
>     > I am having problem using CMake. What should the ITK-DIR option
>     point
>     > to ? I am unable to find ITKConfig.cmake on my system.
>     >
>     > so! urce dir : c:\InsightToolkit-1.2.0\Examples\Installation
>     > bin dir : c:\InsightToolkit-1.2.0\Examples\Installation
>     >
>     > (I am trying to compile the "Hello World" example given in the ITK
>     > tutorial)
>     >
>     >
>     > Thank you in advance
>     >
>     > Tejas
>     >
>     ------------------------------------------------------------------------
>     > Do you Yahoo!?
>     > SBC Yahoo! DSL
>     >
>     > - Now only $29.95 per month!
>
>
>
>
> ------------------------------------------------------------------------
> Do you Yahoo!?
> SBC Yahoo! DSL 
> <http://pa . yahoo . com/*http://rd . yahoo . com/evt=1207/*http://promo . yahoo . com/sbc/> 
> - Now only $29.95 per month!