Unknown CMake command "_qt5_Core_check_file_exists".
Oh sorry didn't notice that you are using Gentoo. This program needs the qt-base package to compile. Did you install gentoo alternative for it?
Unknown CMake command "_qt5_Core_check_file_exists".
Can you please specify the distro you are using?
If it's debian-based or arch-based, did you run all the commands listed in Building section before actual building?