1 回答

TA贡献1815条经验 获得超13个赞
由 qmake 源的代码来看,它不可能。查过 qmake\generators\win32\msbuild_objectmodel.cpp 在 Qt4.8.5 和Qt5 最新版本,由 qmake 添加唯一属性表是 Microsoft.Cpp.*.props (各种) 的:
xml << tag("Import")
<< attrTag("Project", "$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props")
<< attrTag("Condition", "exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')")
<< closetag()
<< closetag();
我通过创建快速的 Python 脚本,不会生成的 *.vcxproj 文件上的后期处理解决了此问题:
for l in fileinput.FileInput('Project.vcxproj', inplace=1):
print l,
if 'PropertySheets' in l:
print ' <Import Project="YourPropertySheets.props" />'
当然,它将更好地修补 qmake 的新功能,但由于包括你和我都困扰着这个只有三个人,我相信黑客是最佳的解决办法。
添加回答
举报