[vtk-developers] Wrapping vtkConfigure.h, vtkType.h, etc.
David Gobbi
david.gobbi at gmail.com
Mon Aug 16 13:45:48 EDT 2010
Hi All,
I'm looking for the best way to modify the VTK cmake scripts so that I
can automatically wrap constants like VTK_POLY_DATA. Right now, some
of these constants are hard-coded in e.g. vtkConstants.py but of the
wrapper's "hard-coded" copies of the constants are never up to date.
The only thing that is needed to python-wrap these constants is to
pass the header files vtkConfigure.h, vtkType.h, etc. to
vtkWrapPython. One way to do this is to add these headers to the
source list:
Set(Kit_SRCS vtkType.h ...)
SET_SOURCE_FILES_PROPERTIES(vtkType.h HEADER_FILE_ONLY)
However, I'm reluctant do to this because no other VTK header files
are handled this way. The alternative is to make a separate list for
header files, one that will be used by KitCommonPythonWrapBlock.cmake:
Set(Kit_HDRS vtkType.h ...)
And then in KitCommonPythonWrapBlock.cmake:
SET(FILES_TO_WRAP ${Kit_SRCS} ${Kit_HDRS})
VTK_WRAP_PYTHON3(vtk${KIT}Python KitPython_SRCS "${FILES_TO_WRAP}")
I'm leaning towards this latter method, because it seems to be the
tidier of the two approaches.
David
More information about the vtk-developers
mailing list