Intel oneAPI MKL install and how CMake finds a version of MKL

After installing Intel One API MKL, CMake files are installed in

C:\Program Files (x86)\Intel\oneAPI\mkl\latest\lib\cmake\mkl\

Also as part of the installation process some change is made so CMake will always look in the above location “first” when looking for MKL using find_package(mkl REQUIRED)

Does anyone know where this is recorded? The Windows registry? Somewhere in the CMake installation?

I need to be able to change where CMake finds MKL ( to use older/different versions, including installed by Conan package manager) - but my attempts have been abysmal failures.

There might be an installed registry key. See these docs.

cmake -Dmkl_ROOT -Bbuild is a way to hint the mkl config cmake script location

verify this by adding to above option ``-debug-find-pkg=mkl`

I found the reason for my issues , the intel setvars.bat adds to the CMAKE_PREFIX_PATH