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

**URL:** https://discourse.cmake.org/t/intel-oneapi-mkl-install-and-how-cmake-finds-a-version-of-mkl/10039
**Category:** Usage
**Tags:** os:windows, comp:intel
**Created:** [February 8, 2024, 5:30pm UTC](https://discourse.cmake.org/t/intel-oneapi-mkl-install-and-how-cmake-finds-a-version-of-mkl/10039 "2024-02-08T17:30:13Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![loopless](https://discourse.cmake.org/user_avatar/discourse.cmake.org/loopless/32/2163_2.png) [@loopless](https://discourse.cmake.org/u/loopless)
#### Post date: [February 8, 2024, 5:30pm UTC](https://discourse.cmake.org/t/intel-oneapi-mkl-install-and-how-cmake-finds-a-version-of-mkl/10039/1 "2024-02-08T17:30:13Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [February 17, 2024, 5:52am UTC](https://discourse.cmake.org/t/intel-oneapi-mkl-install-and-how-cmake-finds-a-version-of-mkl/10039/2 "2024-02-17T05:52:05Z")

</div>

There might be an installed registry key. See [these docs](https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#system-package-registry).

---

<div class="post-metadata">

### Author: ![scivision](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@scivision](https://discourse.cmake.org/u/scivision)
#### Post date: [February 19, 2024, 7:13pm UTC](https://discourse.cmake.org/t/intel-oneapi-mkl-install-and-how-cmake-finds-a-version-of-mkl/10039/3 "2024-02-19T19:13:56Z")

</div>

`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`

---

<div class="post-metadata">

### Author: ![loopless](https://discourse.cmake.org/user_avatar/discourse.cmake.org/loopless/32/2163_2.png) [@loopless](https://discourse.cmake.org/u/loopless)
#### Post date: [April 11, 2024, 4:06am UTC](https://discourse.cmake.org/t/intel-oneapi-mkl-install-and-how-cmake-finds-a-version-of-mkl/10039/4 "2024-04-11T04:06:10Z")

</div>

I found the reason for my issues , the intel setvars.bat adds to the CMAKE\_PREFIX\_PATH
