Fix permanently out-of-date .qm files
An incremental build without changed .ts files must be a null build.
However, the .qm files were always re-generated. That was, because
add_custom_target was used to run lrelease, and such targets are always
out of date.
Use the new target-based translation API that uses add_custom_command
under the hood. This fixes the described issue and simplifies the
project file a lot.
For the target that runs lupdate: the .ts file must not be a by-product
of the custom target. Otherwise, the updateqm target would trigger the
ts-${catalog}-${lang} targets. There should be no connection between
the lrelease and lupdate targets.
Pick-to: 6.2
Fixes: QTBUG-96038
Change-Id: I1faf35f1eab154be3a12dfaed93d64799dbb6ff1
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>