During cmake, it mentions that it is downloading and/or building several shared libraries. If you don't plan on distributing your build I would just install those necessary libraries from apt, and re-configure cmake. It will then link against those shared libraries instead. Those would include ffmpeg (libavcodec), libsdl2, libjansson, libpng, libpjpeg, and I might be forgetting one or two. You need the development versions of said libraries. Basically, if it says it is compiling a library from source, you can probably install it via your package manager instead. You'll get faster build times and less clutter in the build folder to boot.