TBB_DIR keeps resetting to TBB_DIR-NOTFOUND

I am trying to build OpenCV 4.5.1 from source on Windows 10, and I am not sure what value should I put in TBB_DIR variable when building with CMake. It keeps resetting to TBB_DIR-NOTFOUND. Can somebody help me please?

Try running

“C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\tbb\bin\tbbvars.bat”
intel64
“C:\Program Files\CMake\bin\cmake-gui.exe”

from from the command prompt to launch cmake gui. This should set everything up for you so when you select

WITH_TBB

all the paths should be picked up automatically.

I am using latest tbb from Intel oneAPI dist. I am not sure if your answer is of any help, but thanks anyways. :slight_smile: