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>
commitc17fc36d54b247e5aee9e609ac91687a9548c257
parentdbcf76dc2f7173906eee6c6f83630a90ab80b4a4
authorJoerg Bornemann <joerg.bornemann@qt.io>
committerJoerg Bornemann <joerg.bornemann@qt.io>
commit timeFri, 27 Aug 2021 09:01:36 +0200