3

We would like to use scons for building on Windows, mainly because of its caching facilities (we use ccache on Linux, and compiliation is considerably faster there). However, all our projects are defined in qmake .pro files. The way building now works, is that we call qmake to generate a Makefile, which we then use to build with jom. Having .pro files on a high level is quite practical, so we would like to keep that and not replace the .pro files by SConfigure files. So ideally we would have qmake generate a SConfigure file, the same way it generates a Makefile now, and then run scons on that SConfigure file. Is there something out there that can do that, maybe some generator for qmake? Or is it somehow possible to convert the Makefile created by qmake into an SConfigure file?

(I'm aware that the functionality of scons and qmake overlap, for instance the dependency generation and that it would likely be better to use just scons by itself, however, qmake works quite well for Qt projects and can also generate visual studio files, so we would like to keep it.)

4

1 回答 1

1

他们对元元制作不是很满意。但是,正如在被拒绝的合并请求中所建议的那样,使用 QMAKE_SUBSTITUTES 可能会在源外进行某些事情,但这实际上是一个未记录的功能。

或者你可以按照我尝试的方式直接修改代码。看看https://qt.gitorious.org/~phresnel/qt/add-some-qmake-to-autotools-glue,或者更具体地说是 https://qt.gitorious.org/qt/qt 的差异/merge_requests/1040。该文件qmake/generators/special/filelist.cpp完成了大部分工作。

恕我直言,真的很遗憾qmake的扩展并不容易;CMake 更大的灵活性也是我改用它的原因,完全放弃了我对 qmake 的使用。

于 2011-08-30T13:05:33.747 回答