[CMake] QT5 i18n with cmake / QT5_CREATE_TRANSLATION

Wambach, Florian [Rohmann GmbH] wambach at rohmann.de
Fri Jul 1 12:02:38 EDT 2016


// ----
tldr; QT5_CREATE_TRANSLATION calls lupdate with unwanted parameter @lst_file
// ----

despite being quite new to cmake, I succeeded to create a new project including Qt5LinguistTools and a .ts file containing my translations.
For convenient string-update and qm-compilation, I added a section into my cmake file to call lupdate and lrelease on my file(s) using the defined macro QT5_CREATE_TRANSLATION.

It actually calls lupdate, with my ts-file and my other given options, but always also including the additional parameter

@<my_project_build_dir>/<tsfilename>_lst_file

(to tell lupdate additional source directories).
I assumed my source directory as content, but surprisingly it contains all Include paths used in the project:

E.g., as I also use boost library, my boost_dir is also included. This seems very strange to me.

I analyzed the macro, where the lst_file is being created, so for me it seems as a bug in the cmake macro.

Can I disable this lst_file anyhow -- without touching the macro from qt?

Kind regards,

F. Wambach, DE


More information about the CMake mailing list