This is a patch for issue #15479 (closed). It adds support for depfiles to add_custom_command and the ninja generator.