added generated header as dependency where missing
Also in the meson files that already included the dependency, the variable contains both the generated source file and the header, so I removed the source file because it doesn't need to compile it many times.
Should fix #5596 (closed), though I didn't reproduce it.