This is a CMake template for creating a remote module for VTK 8.9 (or later). The template is an example of a simple VTK module, which can be built together with VTK as a remote module or as a stand-alone module for an existing installation of VTK. Wrapper are created for Python, but wrapper for TCL and Java has been left out.
In the VTK source repository, a folder is reserved for remote
modules, VTK-9.0.1/Remote
. To include this module as a remote module, do the following
- Create a file
VTK-9.0.1/Remote/MyProject.remote.cmake
containing the following# # MyProject # vtk_fetch_module(MyProject "Short description of the module" GIT_REPOSITORY https://gitlab.bkmedical.com/MyProject # Replace with location # May 28, 2021 v0.7 GIT_TAG 196f99dbbf52003c52323501081861a909f94301 )
- When VTK is build, they module vtkMYPROJECT will appear as an option to build and install
cmake .. -DVTK_MODULE_ENABLE_VTK_vtkMYPROJECT=ON
I have tested this only using VTK 9.0.1 and only the build phase.
Simply run CMake. Note that only VTK 8.9+ is supported and this sample project depends on Qt since it is an interactor for a game pad. 3D/4D algorithm will be independent of Qt.
- Simply run CMake (Python wrapper are enabled by default) cmake ..
The solution will contain the projects:
- ALL_BUILD
- Continuous
- Experimental
- INSTALL
- MYPROJECT
- Nightly
- NightlyMemoryCheck
- RUN_TESTS
- TestInteractorStyleGame
- vtkMYPROJECT-hierarchy
- vtkMYPROJECTPython
- ZERO_CHECK
The only projects of interest are
MYPROJECT
, TestInteractorStyleGame
and
vtkMYPROJECTPython
. The first project is the module, the
second is a test project and the last is the wrapper project for
Python.