Collect build targets after running preGenerateCommands. Fixes #144.

This enables used generated source files without listing each of them manually. Now a single "sourcePaths" entry is sufficient.