[vtkusers] probe vtk6 installation for AUTOINIT values
Trevor Irons
trevorirons at gmail.com
Thu Aug 16 18:37:18 EDT 2012
On 16 August 2012 17:32, Marcus D. Hanwell <marcus.hanwell at kitware.com>wrote:
> On Tue, Aug 14, 2012 at 6:09 PM, Trevor Irons <trevorirons at gmail.com>
> wrote:
> > I suppose this is a CMake question, but it pertains to VTK, so I
> apologize
> > if it is not the right place to ask this.
> >
> > Is there any way to probe an existing VTK 6 installation for the
> AUTOINIT
> > string that is used during compilation. For instance on my local machine,
> > these define statements are necessary
> >
> >
> -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL)"
> > -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)"
> >
> > But hard coding these values will clearly not be portable. If anyone has
> > found a solution to this I'd appreciate any ideas. For what it's worth,
> I'm
> > using SCons instead of CMake to build a library which can use an existing
> > VTK installation. So it is possible to parse through files, but not
> simply
> > grab CMake variables (that I know of at least).
> >
> Hard coding those lines should be quite portable, you can look at how
> we generate the definitions in the CMake/vtkModuleAPI.cmake files. The
> modules have module.cmake files, and these contain information about
> which module a particular module might provide implementations for
> (IMPLEMENTS in the module.cmake files).
>
> They are providing a map for the compiler, i.e. vtkRenderingCore has 3
> modules that implement parts of its API. That define will ensure that
> the object factory for the three modules will be initialized.
> vtkRenderingVolume has just one implementation module, and its object
> factory code will be initialized.
>
> Hope that helps.
>
> Marcus
>
Thanks a lot Marcus, I'll try and make sense of that CMake file. If I
follow you though, I should just be able to search for vtkRenderingOpenGL
or Mesa or (whatever else) and whichever exists just change this define
statement? Is that correct? So if I detect say Mesa(sp? MESA) libraries
like
vtkRenderingVolumeMesa.so
Then just use
-DvtkRenderingVolume_AUTOINIT=\"1(vtkRenderingVolumeMesa)\" ''')
-DvtkRenderingCore_AUTOINIT=\"3(vtkInteractionStyle,vtkRenderingFreeTypeMesa,vtkRenderingMesa)\"
Is this accurate? Will vtkInteractionStyle always be without the engine
name appended to it?
Cheers,
Trevor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120816/b06493e4/attachment.htm>
More information about the vtkusers
mailing list