VTK/Configure and Build
Introduction
Hello! Welcome to the wiki.
This page is applicable for VTK 6.0 and above. For earlier versions, refer to a deprecated version of this document.
This page describes how to configure and build VTK, with several popular options turned on.
Prerequisites
- The VTK build process requires CMake version 2.8.8 or higher and a working compiler. On Unix-like operating systems, it also requires Make, while on Windows it requires Visual Studio (8 or later).
- Building VTK with Qt is a common use case for the creation of nice user interfaces. Using Qt 4.8.* is recommended, but earlier versions and Qt 5.* are in various stages of support. Visit the Qt download page to get a copy of the source code or installer. Either the LGPL or commercial versions of Qt may be used.
Download And Install CMake
CMake is a tool that makes cross-platform building simple. If CMake does not exist on the system, and there are no pre-compiled binaries, use the instructions below on how to build it. Use the most recent source or binary version of CMake from the CMake web site.
Using Binaries
There are several precompiled binaries available at the CMake download page.
On Unix-like operating systemsLet's say on Linux, download the appropriate version and follow these instructions: cd $HOME wget http://www.cmake.org/files/v2.8/cmake-2.8.12.2-Linux-i386.tar.gz mkdir software cd software tar xvfz ../cmake-2.8.12.2-Linux-i386.tar.gz
|
On Windows
On Windows, if you are not administrator
|
Build Your Own CMake
On Unix-like operating systemsDownload the source code: http://www.cmake.org/files/v2.8/cmake-2.8.12.2.tar.gz cd $HOME wget http://www.cmake.org/files/v2.8/cmake-2.8.12.2.tar.gz tar xzf cmake-2.8.12.2.tar.gz cd cmake-2.8.12.2 ./configure --prefix=$HOME/software make make install
|
On WindowsTo build CMake on windows, a previous version of CMake is required. This can be downloaded from the Cmake download page: [1]. |
Download VTK Source code
Download a Release
Download a VTK release from the VTK Downloads page.
Checkout the VTK Repository with Git
If you want the nightly updates of VTK, this is your best bet. Checking out from source control also greatly facilitates the process of contributing back. Note that you may need to download and install a git client, here: [2]
On Unix-like operating systemsPrepare directory for download # mkdir $HOME/projects # cd $HOME/projects To download the source code # git clone git://vtk.org/VTK.git # cd VTK To update the code # git fetch origin # git rebase origin/master |
On WindowsWe recommend msysgit. msysgit provides an msys shell that has the appropriate environment set up for using git and its tools. |