问题
I have a .pro file that contains conditional includes, like this:
contains(CONFIG, embedded) {
SOURCES += a.cpp
HEADERS += a.h
}
else {
SOURCES += b.cpp
HEADERS += b.h
}
When I run lupdate tool (lupdate myproject.pro) from a terminal, only b.h and .cpp are processed (because embedded is not in the CONFIG variable).
How can I let lupdate process ALL files contained in the .pro file?
回答1:
As a last resort, you could use the lupdate mode that doesn't care about the pro file but instead just scans files:
lupdate [options] [source-file|path]... -ts ts-files
来源:https://stackoverflow.com/questions/5140895/lupdate-and-conditional-includes-in-a-pro-file