Have you read the documentation on using Linguist in a cmake build?
You need to add two commands to your CMakelists.txt file:
One to add the CMake components needed to invoke Linquist during build time:
find_package(Qt6 REQUIRED COMPONENTS LinguistTools)
find_package(Qt6 REQUIRED COMPONENTS LinguistTools)
To copy to clipboard, switch view to plain text mode
And another to actually invoke Linguist to create .ts files for your sources:
qt_add_lupdate(target TS_FILES file1.ts [file2.ts ...]
[SOURCES source1.cpp [sources2.cpp ...]]
[INCLUDE_DIRECTORIES directory1 [directory2 ...]]
[NO_GLOBAL_TARGET]
[OPTIONS ...])
qt_add_lupdate(target TS_FILES file1.ts [file2.ts ...]
[SOURCES source1.cpp [sources2.cpp ...]]
[INCLUDE_DIRECTORIES directory1 [directory2 ...]]
[NO_GLOBAL_TARGET]
[OPTIONS ...])
To copy to clipboard, switch view to plain text mode
The documentation explains what these commands and their parameters mean.
Bookmarks