file(GENERATE): Create output file structures for all directories first
Since !3890 (merged) the source file lookup is done earlier than before. Its parent commit in !3895 (merged) prepared for that. However, that commit did not account for generating and using files in separate subdirectories.
Fix this by evaluating all generated files before adding automatic files.
Fixes: #21144 (closed)
Backport: release
Topic-rename: file-GENERATE-earlier
Edited by Brad King