9prady9 · GitHub

@9prady9

Developers can now invoke cmake as shown below to install dependencies automatically when using vcpkg and cmake.
```cmake
cmake .. -DVCPKG_ROOT:PATH=<path to vcpkg repository tool>
```
or
```cmake
export VCPKG_ROOT=<path to vcpkg repository tool>
cmake ..
```
One may add `-DAF_BUILD_CUDA:BOOL=ON` command line argument to enable CUDA dependency check.
Even if not provided, ArrayFire will silently check for CUDA and enable the backend if available.
There are couple of caveats though for the following dependencies
- cuda
- cudnn
- intel-mkl
As these libraries have complex installation mechanisms, their respective vcpkg dependency is merely a check
for user. They have to be installed using respective vendor provided installers.
A few important notes regarding using vcpg manifest file:
1. For linux developers, currently full support for only Intel MKL compute backend is availalbe.
2. As x64-linux triplet creates static builds only as of now, forge cannot be part of vcpkg dependency list
   on non windows platforms. Nevertheless, the user doesn't need to do anything as fetchcontent workflow is
   the fallback.
3. vcpkg manifest is for development puporses only and isn't intended to be production ready dependency
   management for arrayfire as there are dependencies that don't get built with vcpkg at all.

Read the original on github.com ↗