CMake: Fix empty catalogs.json generated


If there are no checkouts of the Qt repositories qttranslations collects
sources files from, we bailed out of add_ts_targets too early. The
content of translations/catalogs.json was the empty array in this case.

Now, we extend the content and bail out before creating the ts target.

Fixes: QTBUG-112678
Change-Id: I4a07f93571543bd03452dbcd74702bf2d62818b4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
commit898c14544bc63f7e315228c320259cd1e55ad20b
parentd7278dfc047fefce0a8a16e6908cd2021bff5a17
authorJoerg Bornemann <joerg.bornemann@qt.io>
committerJoerg Bornemann <joerg.bornemann@qt.io>
commit timeWed, 12 Apr 2023 13:51:40 +0000