Autogen: Add detection of UI file changes to the pre-build VS case
This fixes a flaw (#17959 (closed), #18741 (closed)) with the pre-build version of Visual Studio AUTOUIC support where modification of the UI file doesn't trigger a re-run of autogen in order to run the modified file through UIC. Given that autogen needs to run before any of the target's sources are compiled (so must be in the pre-build event which doesn't support file dependencies) it seems the only way to fix the issue within the current framework (except reverting to the other method of adding autogen projects into the generated solution) is to add a rule file which depends on the UI files so it will trigger a build if any of them change. The output file for the rule file command is set to a timestamp file which gets touched by the pre-build event (rather than the rule file build command itself) so it represents the time autogen actually ran.
This only works for
*.ui files that are included in the target sources which, as per this comment, seems a reasonable limitation.