You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
2.1 KiB
48 lines
2.1 KiB
2 years ago
|
Introduction:
|
||
|
-------------
|
||
|
|
||
|
This directory provides a starting point to create a local project
|
||
|
that adds classes to VTK. It is intended to enable users to put a few
|
||
|
of their own classes into a new local kit. The classes are
|
||
|
automatically wrapped into the same languages into which your VTK
|
||
|
build is wrapped.
|
||
|
|
||
|
What you should do:
|
||
|
-------------------
|
||
|
|
||
|
- Copy this vtkLocal directory to a different out-of-source place, and
|
||
|
remove all CVS subdirs to avoid any accidental commit to the main
|
||
|
VTK CVS.
|
||
|
|
||
|
- Edit the CMakeLists.txt file and add your classes to the vtkLocal_SRCS
|
||
|
list. Also add any VTK kits used by your classes to the vtkLocal_LIBS
|
||
|
list. You can also change the project name, but "vtkLocal" is fine
|
||
|
for most users unless you wish to distribute the library.
|
||
|
Your classes should #include "vtkLocalConfigure.h", or
|
||
|
"<project-name>Configure.h" if you changed the project name. They
|
||
|
should also be declared as "class VTK_vtkLocal_EXPORT vtkMyClass"
|
||
|
or "class VTK_<project-name>_EXPORT vtkMyClass" if you changed the project
|
||
|
name.
|
||
|
|
||
|
- Run CMake as usual. Use your copy of the vtkLocal directory as the
|
||
|
source dir, and choose whatever build directory you prefer.
|
||
|
If it is not found automatically, set VTK_DIR in the CMake GUI
|
||
|
to point to the VTK build tree, or to the install tree in PREFIX/lib/vtk.
|
||
|
|
||
|
- Build your project.
|
||
|
|
||
|
- If you want to use your classes from another C++ project and are
|
||
|
building with shared libraries on windows, add the path to your
|
||
|
build-dir/bin directory to your PATH environment variable so the
|
||
|
DLL can be found (with the Debug, Release, etc. directory name for
|
||
|
Visual Studio builds).
|
||
|
|
||
|
- If you want to use your classes from Tcl, add your project build tree
|
||
|
to the TCLLIBPATH (with the Debug, Release, etc. directory name for
|
||
|
Visual Studio builds). You may load your classes by using
|
||
|
"package require vtkLocalTCL" or "package require <project-name>TCL"
|
||
|
if you changed the project name. Windows users should use forward
|
||
|
slashes (/) instead of the usual backward slashes (\), and should
|
||
|
surround the path by quotes (") if it contains any space. Remember
|
||
|
that TCLLIBPATH is a space-separated list.
|