Proper way to add dependencies to CMake build

Hello!

I’d like to add some MIR tools to Audacity and want to add two dependencies (Torch and Essentia) to the CMake build system. What would be the proper way to add libraries to the build? I’m assuming this involves including the library’s source in the /lib-src directory, and adding a CMake script in the /cmake-proxies directory, though I’m not sure. I’m fairly new to CMake and could use some pointers on how to extend the current build system.

I’m working on top of the latest release (Audacity 2.4.1).

Thanks!