Build VTK with TBB


can anyone guide me how to build VTK with VTK_SMP_IMPLEMENTATION_TYPE = TBB on Windows?

I downloaded TBB from

Unfortunately, I don’t know which folders have to be set since there are various possibilities (e.g. tbb/bin/intel64/vc14 or tbb/bin/intel64/vc14 etc.).

I tried to set all “INCLUDE_DIR” to “tbb\include” all “LIBRARY” DIRs to “tbb\lib\intel64\vc14” but I received some TBB related build errors.

Moreover there is a QGLWidget related error which also occurs when building without TBB.

Thank you for your help.

Most applications nowadays depend on a number of third-party libraries, which are downloaded/built automatically using CMake External Project infrastructure.

In your project, you would dowbload TBB and pass its path to VTK. See an example here:

FYI, you can build with OpenMP easilly as it is integrated in visual studio.

If you need to configure TBB manually, you can do that by:
TBB_INCLUDE_DIR: Path to the folder which contains tbb/tbb.h
TBB_LIBRARY_DEBUG: (Path)/tbb_debug.lib

Also, make sure to always use forward slashes with cmake paths.

1 Like

I have built VTK with TBB on macOS, linux, and iOS. Still need to get around to Android. (We don’t use windows sorry)

Here’s my configure command:

export TBB_ROOT=$PATH_TO_TBB//tbb_2019-linux/

cmake  \
    -DCMAKE_BUILD_TYPE=Release \

You might have to configure the FindTBB.cmake to not use the CMAKE_FIND_ROOT_PATH like I did for iOS:

Hope this helps!

1 Like