Using file(GLOB) in the generates step is discouraged because the globbing result may be out of date when the target is built. Performing the globbing in a script that is executed as the build target means the result is always reproducable and the overhead of globbing is only paid when used.
As a follow up, the dependency on sed may be removed by performing the replacement with cmake. Also, the logic from extract_strings_qt.py can be migrated to cmake.