[Insight-users] Howto build itk with vtk4.0 and cmake ?
Miller, James V (Research)
millerjv@crd.ge.com
Fri, 24 May 2002 11:39:48 -0400
To summarize Luis's message:
VTK and ITK are built separately.
First configure and build VTK (make sure you set
VTK_USE_ANSI_STDLIB="ON").
Then configure and build ITK (telling ITK where your VTK
is during configuration).
-----Original Message-----
From: Luis Ibanez [mailto:luis.ibanez@kitware.com]
Sent: Friday, May 24, 2002 9:30 AM
To: Vincent Daanen
Cc: insight-users@public.kitware.com
Subject: Re: [Insight-users] Howto build itk with vtk4.0 and cmake ?
Hi Vincent
Are you using the Beta release or the
cvs checkout ?
--
Here are some instructions about how
to build ITK in such a way that you
can also link with VTK.
Please let us know if you encounter any
difficulties during the installation.
Thanks
Luis
======================================
BUILDING ITK and VTK
1) Decide between:
a) Installed VTK
b) Compiled VTK
"Installed" means to dowload the compiled
libraries from the web site.
"Compiled" means to download the sources
and compile them in your system.
Both ways work, they just require
different procedures.
If you decide by (1.a):
Just install the version of VTK
following the instructions in:
http://public.kitware.com/VTK/get-software.php
If you decide by (1.b):
Download the sources from
http://public.kitware.com/VTK/get-software.php
and run CMake to configure VTK.
IMPORTANT: Make sure that you enable the option:
VTK_USE_ANSI_STDLIB="ON"
when you configure VTK
NOTE: When you ask ITK to use VTK, the
configuration of ITK will inherit *a lot* of
options from VTK's configuration. So, make
sure that you keep a consistent environment
between the VTK built and the ITK one.
For example, if you are in UNIX, it is a
good idea to define your compilers in the
environment by setting the environment variables
CC and CXX. Make sure that this variables are
set in the same way when you configure VTK and
when you configure ITK. (you don't want to
compile VTK with gcc2.95 and ITK with gcc3.0)
====================================
Once you have configured VTK you can
run CMake for ITK.
There is a sequence of decisions to
make. After each one you have to ask
CMake to "configure" and new options
will appear.
The following is assuming that you
are using "CMakeSetup" in Windows
or "ccmake" on Unix (the Curses
interface to cmake)
2) The first option you have to decide
on is "USE_VTK". Set this option to "ON"
and click on 'configure'
3) New VTK-related options will appear,
they are:
USE_BUILT_VTK
USE_INSTALLED_VTK
VTK_BINARY_PATH
VTK_INSTALL_PATH
The first two are booleans and are exclusive
(that is, if you select one "ON" the other
must be "OFF"). The other two options will
indicate the path where VTK is.
VTK_BINARY_PATH is used when you compile VTK
in your system. This path should point to the
binary directory you gave to CMake when configuring
VTK.
VTK_INSTALL_PATH is used when you install the
precompiled version of VTK. It should point to
the directory where the precompiled libraries
are.
If you want to use the percompiled version
of VTK, select:
USE_BUILT_VTK="OFF"
USE_INSTALLED_VTK="ON"
VTK_INSTALL_PATH= the path to the libraries
If you want to use the version of VTK that
you compile by yourself in your system,
select:
USE_BUILT_VTK="ON"
USE_INSTALLED_VTK="OFF"
VTK_BUILT_PATH= the directory where VTK was compiled
(the one you gave to CMake when configuring VTK)
Once you set this options, click on 'configure'
again (in CmakeSetup or ccmake) and follow the
rest of the configuration.
This completes the VTK-related part of the
configuration.
Hope this helps.
===========================================
Vincent Daanen wrote:
> Hi boys
>
> I'm trying to build itk with vtk4.0
>
> But in Cmakesetup, I can specify only one directory for VTK includepath
> and one file for Vtk library file.
>
> What should I do to successfully build ITK ??
>
> Thanks
>
> Vince
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>
>
_______________________________________________
Insight-users mailing list
Insight-users@public.kitware.com
http://public.kitware.com/mailman/listinfo/insight-users