Convert `add_file_dependencies` to a function. Simplify the implementation using `set_property` with `APPEND`.