lupdate and conditional includes in a .pro file

我是研究僧i 提交于 2019-12-08 02:27:29

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!