cmake: only optionally modify in-source .ts files (Qt lupdate)
The creation of .qm output files from .ts input data undoubtedly needs
to be an unconditional part of the build process. The modification of
.ts source files in contrast needs to remain an intentional activity
during development. The mere act of compiling sources to binaries shall
never modify the source tree. Move the lupdate(1) invocation out of the
default build process, while lrelease(1) remains in place.
Ideally we could have a "make ts-update" target for developers to invoke
as needed. But that'd be more involved since the qt5_create_translation()
cmake routine is involved, which needs to be passed variables content
that is only available at configure time. A future implementation could
investigate the add_custom_target() approach. This commit introduces the
ENABLE_TS_UPDATE cmake option to quickly address the issue.
How to reproduce:
$ cd $SRC
$ cmake --build $OUT
$ git status -s
$ cmake -DENABLE_TS_UPDATE=ON $OUT
$ cmake --build $OUT
$ git status -s
This commit also happens to bring build steps in closer promixity, while
making development iterations stand out more perceivably.