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.)

Janick Bernet
  • 20,544
  • 2
  • 29
  • 55
  • Instead of using scons we are now using a customized version of Qt's own nmake clone jom which I extended with the ability to cache compiled files (bonus is it caches also moc and qrc files). It can be found at https://qt.gitorious.org/~jabernet/qt-labs/jomcache if anyone is looking for something similar. – Janick Bernet Apr 30 '12 at 21:57

1 Answers1

1

They are not very happy with meta meta makes. However, as suggested in that rejected merge request, something might be possible off-source using QMAKE_SUBSTITUTES, but that is a practically undocumented feature.

Or you could go the way I tried and tinker with the code directly. Have a look at https://qt.gitorious.org/~phresnel/qt/add-some-qmake-to-autotools-glue , or more specifically the diff at https://qt.gitorious.org/qt/qt/merge_requests/1040 . The file qmake/generators/special/filelist.cpp does most of the work.

Imho, it is really a pity that extension of qmake is not easier; the greater flexibility of CMake was also the reason why I switched to it, completely abandoning my use of qmake.

Sebastian Mach
  • 38,570
  • 8
  • 95
  • 130