TL ; DR: Is there a way to let “install(FILES output )” add a dependency of the target “install” to the file “output” ?
I am building additional files, which will be used only at install time. Parts of that is the documentation. There is a quite similar old and similar question on stackoverflow (number 9163176). Similar topics here are:
The common solution was always to add the custom target to the common target “ALL”. But that has the drawback, that the targets will we generated everytime, not only when installing. Furthermore the target is always out of date, even if it creates an output.
Is there any other way despite adding a dependency to the ALL-target? Are there any plans to extend the install(FILES …) commands in that direction?