What helped me was to use apt-file to search for the missing packages:
For example running this:
apt-file search Qt5CoreConfig.cmakeReturned the following packages:
qtbase5-dev: /usr/lib/x86_64-linux-gnu/cmake/Qt5Core/Qt5CoreConfig.cmake
qtbase5-gles-dev: /usr/lib/x86_64-linux-gnu/cmake/Qt5Core/Qt5CoreConfig.cmakeThese packages can then be installed with apt or apt-get, e.g.:
sudo apt install qtbase5-dev