This document describes the process of configuring and building VTK from source. Useful information can always be found on the VTK Homepage.
CMake binaries and source code are available here: CMake Releases.
Many Linux style distributions include CMake in their package management systems.
The VTK source code is hosted in a git repository. It can also be obtained in archived format. If you intend to edit the source code and submit patches/features, you will need git.
Git is usually available through the package management systems. You can also build from the source code found Here.
Additional information is provided on the VTK/Git Wiki
Create a build directory - The preferred structure when building VTK is to separate your source code from your build directory.
- In a terminal cd to your build_dir.
ccmake path/to/source-codethat opens a curses dialog
- Press ‘c’ to configure. Configuration needs to occur until issues are resolved and CMake presents the option to generate ‘g’.
- Open cmake-gui.
- Select your compiler.
- Fill in the path to your source code and build directories in the appropriate boxes.
- Click the configure button. Configuration needs to occur until issues are resolved and CMake presents the generate button.
From this point forward, the process between Linux and Windows is basically the same. The following options provide minor deviations from the default configuration and are sufficient to build VTK for the web.
|CMake option||Recommended value||Comment|
|BUILD_TESTING||OFF||While the testing code is very useful, it can take a long time to compile. Users looking for a shorter build time can disable testing code by setting this option to OFF.|
|CMAKE_BUILD_TYPE||Release||Options include Debug, Release, and RelWithDebInfo. Set for your needs.|
|VTK_Group_Web||ON||Mandatory for VTK-Web|
|VTK_WRAP_PYTHON||ON||Builds the python bindings. You will need python 2.7 binaries and header files (devel packages )installed for this option.|
Build using your compiler.
Details of the VTK software process can be obtained from The VTK Software Process Guide