[vtk-developers] building modules outside the vtk 4.0 tree

Lorensen, William E (CRD) lorensen at crd.ge.com
Wed Dec 19 13:45:01 EST 2001

We have an entire set of classes in mulitple directories that we call gevtk. We have set it up using
cmake to build getvtk and vtk. We added our own tcl packages in the gevtk tree. We did not have to
edit any files in the vtk tree. This was much easier than the old method where we had a customized
pcmaker. ALso this new tree uses libraries like the Ghost haptics library.

It did take many steps (there may have been 15 I can't recall), but it is diable.


-----Original Message-----
From: Sebastien BARRE [mailto:sebastien.barre at kitware.com]
Sent: Wednesday, December 19, 2001 11:57 AM
To: Michael Halle
Cc: vtk-developers at public.kitware.com
Subject: Re: [vtk-developers] building modules outside the vtk 4.0 tree

At 12/19/2001 11:10 AM, Michael Halle wrote:

>I'm inspired by the helpful "vtk Local in 15 steps" posting to ask
>the following question:
>     In vtk4.0, how hard is it (under Unix) to build a module outside of
>     the main vtk source tree?

It's not hard, and it's indeed very easy, the approach is the same for both 
Unix and Windows.
As reported to the users list:

=> Today, I will create a full-fledged example (and post it to the CVS) on 
how to build a local directory with your own classes, using whatever VTK 
build dir, and without modifying any of the VTK files.

I hope it will help some of you who are facing this problem.

>Background: Our lab currently faces the problem of a great
>proliferation of compiled copies of the vtk source tree.  Every
>developer has one.  Everyone builds their own Local library.  It's
>a nightmare to maintain.

Definitely. The example I'll post do not modify any of the VTK files. You 
can share a single VTK copy.

>Now we face the task of doing the same thing for vtk4.0.  Can anyone
>tell me if they think it will be easier or harder? \

It's way more easier. To achieve the same thing in 3.2 I had to write a set 
of Perl script basically emulating pcmaker. It was becoming harder to 
maintain, so I looked for a new build tool, trying several of them (tmake, 
and so on). Later on Bill started to post about CMake, and I joined in. It 
was quite easy to switch to VTK 4.0 + Cmake and I was definitely happy to 
get rid of these nasty Perl scripts.

>  It seems that if
>we encouraged this kind of loadability, hacking vtktcl.c to add Local
>shouldn't be needed, since Tcl can do the load by itself.

The example I will post does not need that.

Sebastien Barre

vtk-developers mailing list
vtk-developers at public.kitware.com

More information about the vtk-developers mailing list