Linguist file *.qm into CMakeList.txt ?



  • I have already created a .qm translation binary with the QLinguist. Now, I would like to add that to my Qt5 project, which does not operate on Qt-Project (.pro) files. We use CMakeList.txt files exclusively..

    I found some examples in the internet, so my CMakeFile contains:

    Find_package(Qt5LinguistTools)
    SET(TRANSLATIONS :/res/translation_german.qm)
    QT5_ADD_TRANSLATION(QM ${TRANSLATIONS}) # this does not make any sense? Since I alread yhave *.qm ?
    /# ..
    appName ${ProgramSources_SRCS} ${TRANSLATIONS} ${programName_ui_H}
    /# Are programName_ui_H all headers where a translation shall take place?
    /# Are ProgramSources_SRCS all headers where a translation shall take place?


  • Lifetime Qt Champion

    Hi,

    You have in Qt's cmake documentation the explanation of the variable to use for that.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.