lupdate 和条件包含在 .pro 文件中 [英] lupdate and conditional includes in a .pro file

查看:43
本文介绍了lupdate 和条件包含在 .pro 文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含条件包含的 .pro 文件,如下所示:

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  
}  

当我从终端运行 lupdate 工具 (lupdate myproject.pro) 时,只处理 b.h 和 .cpp(因为嵌入不在 CONFIG 变量中).
如何让 lupdate 处理 .pro 文件中包含的所有文件?

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?

推荐答案

作为最后的手段,您可以使用不关心 prolupdate 模式文件,而只是扫描文件:

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

这篇关于lupdate 和条件包含在 .pro 文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆