[vtk-developers] "Correct" way to wrap vtk downstream project

David Gobbi david.gobbi at gmail.com
Mon Feb 22 11:41:23 EST 2016


Hi Adam,

At the moment, the only clean way to wrap a module is to build it as a
remote module, which builds it within the VTK tree. The wiki page for
remote modules is here:
http://www.vtk.org/Wiki/VTK/Remote_Modules

It is possible to wrap code outside of the VTK tree, but it can be messy.
For example, here is the CMakeLists.txt for one of my projects that
provides Python, Tcl, and Java wrapping:
https://github.com/dgobbi/vtk-dicom/blob/master/Source/CMakeLists.txt

 - David

On Mon, Feb 22, 2016 at 9:25 AM, Adam Rankin <arankin at robarts.ca> wrote:

> Hello all,
>
>
>
> I have modified our lab’s library to use the VTK module system (wow, very
> nice!) and am attempting to determine the “correct” way to wrap the modules
> in python.
>
>
>
> I see that VTK uses /Wrapping/Python as its launch point, but I cannot
> call that from my project because of the python executable and vtk specific
> file entries (CMakeLists.txt:157-277 except 260-267).
>
>
>
> Aside from duplicating this folder from VTK and tweaking it to my setup,
> is there a clean way to perform CMake commands to python wrap my modules?
>
>
>
> I have included a sample module CMakeLists.txt and module.cmake file so
> you can hopefully understand what I’ve done.
>
>
>
> Cheers,
>
> Adam
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160222/fcb54c4d/attachment.html>


More information about the vtk-developers mailing list