« Minor update: version | Main | QTM ... with Qt 4.2 »

QTM changes build system

QTM has now jumped on the CMake bandwagon, and a new version of the source bundle has been uploaded to SourceForge and KDE Apps which includes a CMake project file as well as the old QMake one. I don't intend to get rid of the QMake version yet; for one thing, it's still useful in preparing the Mac application bundle which doesn't require installing; it just needs dragging to the Applications folder, which is not the case on any other OS. This was built with the help of Jacek at Qt Centre, who wrote this guide at the Qt Centre Wiki to building Qt 4 programs with CMake. Note that the CMake project file example at qtnode does not work; I tried it myself and it didn't make it past the configure stage.

To build and install, you need to type "cmake ." from the directory where the source files are (note the dot, denoting the current directory). Then you type "make" and then, as root or with sudo, "make install" (without the quotes in each case). Note that Makefiles built with CMake give a concise, pretty and colourful output as standard, quite unlike the (to most users) incomprehensible list of commands the old Makefiles made.

You need CMake version 2.4.3 or 2.4.1; version 2.4.2 is not reliable. It can be obtained from this page on the CMake homepage, or (and preferably) as a binary from a repository specific to your OS. Note that Ubuntu Dapper has a 2.2 version which is not suitable for this purpose.


TrackBack URL for this entry:


Did you finally figured out how to do the install_name_tool stuff automatically with qmake ?

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)