[vtkusers] PythonWrapper?

Mathieu Malaterre Mathieu.Malaterre at creatis.insa-lyon.fr
Mon Nov 17 04:30:46 EST 2003


Karshi,

	Here is a CMakeLists sample:

CMAKE_MINIMUM_REQUIRED(VERSION 1.6)
PROJECT(MyProject)
INCLUDE_REGULAR_EXPRESSION("^.*$")

# Look for a VTK build directory
FIND_PACKAGE(VTK)
IF (VTK_FOUND)
   INCLUDE (${VTK_USE_FILE})
ENDIF (VTK_FOUND)

# Source files included in the plugin
SET( MyProject_SRCS
   vtkMyClass.cxx
)

# The C++ files must be made into a C++ library
ADD_LIBRARY ( vtkMyClass ${vtkMyClass_SRCS})

# set the libraries to link against
TARGET_LINK_LIBRARIES(vtkMyClass vtkIO vtkRendering)

# Configure Python module, which is the plugin itself
IF (VTK_WRAP_PYTHON)
   VTK_WRAP_PYTHON2(vtkMyClassPython
                    vtkMyClassPython_SRCS
                    ${vtkMyClass_SRCS})
ADD_LIBRARY(vtkMyClassPython SHARED
   ${vtkMyClassPython_SRCS})
TARGET_LINK_LIBRARIES (vtkMyClassPython
                        vtkMyClass
                        vtkIOPython
                        vtkRenderingPython)
ENDIF (VTK_WRAP_PYTHON)

Ref:
http://public.kitware.com/pipermail/vtkusers/2003-September/020275.html

HTH
mathieu


Karshi F.Hasanov wrote:
> Hi all,
> 
> Is there any manual how to build Python wrapper *.cxx  files?
> Thanks
> 
> _______________________________________________
> This is the private VTK discussion list. Please keep messages on-topic. 
> Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 


-- 
Mathieu Malaterre
CREATIS
28 Avenue du Doyen LEPINE
B.P. Lyon-Montchat
69394 Lyon Cedex 03
http://www.creatis.insa-lyon.fr/~malaterre/




More information about the vtkusers mailing list