there is a .pri as a part of qmake project which contains some global string definitions :
STR1 = string literal 1
STR2 = string literal 2
GIT_VERSION = $$system($$ENV_GIT_EXE_PATH describe --long)
and these strings used in a code :
QString str1 = QStringLiteral(STR1);
QString str2 = QStringLiteral(STR2);
QString str3 = QStringLiteral(GIT_VERSION);
How to implement this functionality using cmake project? I can't change the sources (C++.h/.cpp) and have to prepare those strings somehow using cmake abilities