Compile VTK source code with CMKAE
1. Install Cmake
Download the installation package: http://www.cmake.org/download/
Select the.exe file to download and install it on your local computer.
2. Get the VTK source code
2.1 source url: http://www.vtk.org/download/
Download vtk-6.2.0.zip (VTK source code) vtkdata-6.2.0.zip (data) vtkdochtml-6.2.0.tar.gz (help document)
2.2 Unzip to local folder
Unzip vtk-6.2.0.zip to F:\vtk_6.2\ VTK
Unzip vtkdata-6.2.0.zip to F:\vtk_6.2\ VTKData
Unzip vtkdochtml-6.2.0.tar. gz to F:\vtk_6.2\vtkDocHtml
3. Run cmake to compile
Select the Source Code directory as F:\vtk_6.2\ VTK
Select the bin directory after build as F:\vtk_6.2\bin
Click the Configure button, the selection compiler pops up, I chose Visual Studio 2010, automatically scan the required files.
4. Modify Cmake parameter (On is ticked)
4.1 BUILD_EXAMPLES Select ON, which you can use to learn about VTK examples
4.2 BUILD_SHARED_LIBS Select ON to generate dynamic link library DLLs
4.3 MODULE_VTKGUISUPPORTQT Select ON to support QT interface (click Advanced parameters, this option will appear)
4.4 CNAJE_INSTALL_PREFIX = C: \ ProgramFiles \ VTK
Then, click the Configure button again and let CMake scan the configuration file again. When it runs successfully, the red color will disappear from the page. If it still has red color, see what else needs to be selected on the red TAB
At the end of the scan, click the Generate button to Generate the VS project of VTK.
5. Open the VS project of VTK and compile it
Open the vtk.sln project in the F:\vtk_6.2\bin directory
The first step is to select the type of file to output, Debug or Release for ALL_BUILD and INSTALL, as shown in the figure below.
1. Install Cmake
Download the installation package: http://www.cmake.org/download/
Select the.exe file to download and install it on your local computer.
2. Get the VTK source code
2.1 source url: http://www.vtk.org/download/
Download vtk-6.2.0.zip (VTK source code) vtkdata-6.2.0.zip (data) vtkdochtml-6.2.0.tar.gz (help document)
2.2 Unzip to local folder
Unzip vtk-6.2.0.zip to F:\vtk_6.2\ VTK
Unzip vtkdata-6.2.0.zip to F:\vtk_6.2\ VTKData
Unzip vtkdochtml-6.2.0.tar. gz to F:\vtk_6.2\vtkDocHtml
3. Run cmake to compile
Select the Source Code directory as F:\vtk_6.2\ VTK
Select the bin directory after build as F:\vtk_6.2\bin
Click the Configure button, the selection compiler pops up, I chose Visual Studio 2010, automatically scan the required files.
4. Modify Cmake parameter (On is ticked)
4.1 BUILD_EXAMPLES Select ON, which you can use to learn about VTK examples
4.2 BUILD_SHARED_LIBS Select ON to generate dynamic link library DLLs
4.3 MODULE_VTKGUISUPPORTQT Select ON to support QT interface (click Advanced parameters, this option will appear)
4.4 CNAJE_INSTALL_PREFIX = C: \ ProgramFiles \ VTK
Then, click the Configure button again and let CMake scan the configuration file again. When it runs successfully, the red color will disappear from the page. If it still has red color, see what else needs to be selected on the red TAB
At the end of the scan, click the Generate button to Generate the VS project of VTK.
5. Open the VS project of VTK and compile it
Open the vtk.sln project in the F:\vtk_6.2\bin directory
The first step is to select the type of file to output, Debug or Release for ALL_BUILD and INSTALL, as shown in the figure below.
The default Files are in the C: Program Files\VTK folder. Copy it into an environment variable and program it
Read More:
- Summary of problems encountered in compiling and installing vtk7 + vs2013 / 2015 + cmake
- CMake_ Compiling VTK_ 9.0.0 running vtkcommoncolor DLL has access conflict
- Problems in compiling VTK with cmake: solutions to error configuration process, project files may be invalid
- Vs2012 compiling PCL dependency library vtk7.0
- Qt5 when compiling VTK_ The solution of dir-notfound
- Two methods of cmake in VTK program
- Common mistakes and solutions of cmake + QT + VTK
- Qt5 when cmake configures VTK_ The solution of dir-notfound
- The collapse pits of VTK projects that are not generated by cmake
- To solve problems in cmake VTK: error configuration process, project files may be invalid
- CMake Error: Could not find CMAKE_ROOT !!!
- CMake Error at CMakeLists.txt:5 (PROJECT): The CMAKE_C_COMPILER: cl is not a full path
- Solutions to several VTK compilation errors (vtk5.8 + VS2010)
- Clion appears cmake error: could not find cmake_ Root! What is the problem and how to solve it?
- VTK series: installation and introduction of VTK
- CMake Error:Could not find CMAKE_ROOT!!!
- Visual slam Lesson 6: curve fitting with g2o, error: cmake error at CMakeList.txt (find_ package) By not providing“FindG2O.cmake“
- VTK: VTK error problem set
- Vs2017 compiles pcl1.8.1 with vtk8.0 and uses qt5.9.5
- [VTK] vtk8.2.0 + vs2015 + win10 compilation and configuration