Skip to content
Snippets Groups Projects
Commit 1ebfa5bc authored by Max Smolens's avatar Max Smolens
Browse files

python: Add wrapping of kits when VTK_ENABLE_KITS is ON


If VTK_ENABLE_KITS is ON, VTK kits and modules that are not associated with any
kit will be wrapped. The effect is that drastically fewer libraries are created.

Take vtkCommon as an example. When VTK_ENABLE_KITS is OFF, a library is
generated for each wrapped module:

    vtkCommonColorPython27D-x.y.dll
    vtkCommonComputationalGeometryPython27D-x.y.dll
    vtkCommonCorePython27D-x.y.dll
    vtkCommonDataModelPython27D-x.y.dll
    vtkCommonExecutionModelPython27D-x.y.dll
    vtkCommonMathPython27D-x.y.dll
    vtkCommonMiscPython27D-x.y.dll
    vtkCommonSystemPython27D-x.y.dll
    vtkCommonTransformsPython27D-x.y.dll

When VTK_ENABLE_KITS is ON, a single "kit" library is generated:

    vtkCommonKitPython27D-x.y.dll

The wrapped kits have the suffix "Kit" to avoid naming conflicts with existing
libraries like "vtkFilterPython".

As part of this change, the Python wrapping function has been split into two
functions, one which wraps the code and another which builds the wrapped code.
The new function is backwards compatible, but to update client code, replace
calls like:

    vtk_add_python_wrapping(${module})

with:

    vtk_add_python_wrapping(${module} module_srcs)
    vtk_add_python_wrapping_library(${module} module_srcs ${module})

Additionally, the functions "vtk_wrap_python" and "vtk_add_python_wrapping" have
been updated to understand a list of modules as input.

Co-authored-by: default avatarJean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
Co-authored-by: default avatarMax Smolens <max.smolens@kitware.com>
Co-authored-by: default avatarBen Boeckel <ben.boeckel@kitware.com>
parent 3a0ed04e
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment