Skip to content

Latest commit

 

History

History
58 lines (37 loc) · 2.26 KB

build.md

File metadata and controls

58 lines (37 loc) · 2.26 KB

QuickVtk

Build Instructions

QuickVtk can be built for macOS and Windows via CMake. Building the project takes three steps:

Step 1 - Install the Qt binaries

Download and launch the installer from the Qt download section.

Step 2 - Build VTK

VTK can be built as a separate project from the libs folder located in the project directory. Launch CMake and set the paths to src and bin:

  • src: QuickVtk/libs/src
  • bin: QuickVtk/libs/bin

You can specify a git tag to build a certain version of VTK. Configure, generate and build the project.

Alternatively, you can build VTK manually or use already built binaries from your system if available. Just make sure to use OpenGL2 for the VTK_RENDERING_BACKEND option and enable Module_vtkRenderingExternal.

Step 3 - Build QuickVtk

After successfully installing Qt and building VTK, launch CMake and set the paths to src and bin:

  • src: QuickVtk
  • bin: QuickVtk/bin

Specify the version and path attributes for Qt and VTK and finally configure, generate and build the project. Tested project generators are:

  • Unix Makefile (recommended for building VTK on macOS)
  • XCode (recommended for building QuickVtk on macOS)
  • Microsoft Visual Studio 2015 (for Windows)

Note when building with Visual Studio: Make sure to set the environment in the IDE. Add the paths for Qt and VTK to the Environment field found in the project properties view under Debugging:

Copy-Paste-Helpers:

path-to-vtk: C:\Dev\QuickVtk\libs\bin\Vtk\bin\bin\Debug
path-to-qt: C:\Qt\5.7\msvc2015_64\bin

Those paths vary depending on the project location, Qt installation, build type, MSVC version, compiler type, etc. In the end, the value for Environment should look like this:

PATH=<path-to-vtk>;<path-to-qt>;%PATH%;