[vtk-developers] Possible mistake in /Examples/Build/vtkLocal/CMakeLists.txt
Michael Scarpa
m.scarpa at uva.nl
Thu Jan 4 04:18:42 EST 2007
Dear VTK developer community,
I have come across what I believe to be a mistake in the
CMakeLists.txt file for the vtkLocal example. This regards the use
of the "hints" file for the generation of wrappings in Tcl and
Python. Looking at the file in it's latest version (as found today
in CVS), on line 136 the following statement is found:
SET(VTK_WRAP_HINTS "${PROJECT_SOURCE_DIR}/hints")
This statement is located inside the IF(VTK_WRAP_JAVA) clause, and I
believe this happens because before this, on line 134, the file $
{VTK_CMAKE_DIR}/vtkWrapJava.cmake is included. If I am not mistaken,
including that file sets VTK_WRAP_HINTS to the "hints" file in the
VTK source directory and must therefore be reset correctly after the
inclusion.
The same instruction to correctly reset VTK_WRAP_HINTS is missing in
the clauses for VTK_WRAP_TCL and VTK_WRAP_PYTHON. This causes the
generated makefiles to point to the "hints" file in the main VTK
source directory and therefore any instructions provided in the
"hints" file of the vtkLocal example (or derivatives thereof) are
ignored.
I have just spent half a day hunting this down, trying to find why a
"double *GetPosition()" method of a custom vtk class would not be
wrapped in Python if it was defined explicitly (i.e. NOT using
vtkGetVector3Macro). After copying the instruction from line 136 to
AFTER line 120 in the CMakeLists.txt file, the problem was resolved
and the method got correctly wrapped (in Python). The corresponding
makefile (vtkLocal/build/CMakeFiles/vtkLocalPython.dir/build.make)
did also point to the correct "hints" file. I presume that the same
modification has to happen also for the VTK_WRAP_TCL clause earlier
in the CMakeLists.txt file (judging from the content of the same
makefile).
Could someone please verify this and, if confirmed, could these
changes be taken over in the CVS repository? Any comment is
obviously most welcome.
With kind regards,
Michael
More information about the vtk-developers
mailing list