Skip to content

How to get the CMake version you need

Friday, 14 November 2008  |  alexander neundorf

KDE svn trunk requires [ CMake] 2.6.2 since last week. Version 2.6.2 has been released just a few weeks ago, so maybe there are not yet packages for all distros.

So how do you get CMake 2.6.2 ?

Of course you can get the sources (from cvs or as source package from ) and build it yourself.

But you can also get away with less work and just use the binary CMake packages provided by [ Kitware]. You think they won't work on your Linux distribution ? I can tell you, they most probably will. At least I haven't found an x86 Linux box yet where they don't work.

So, here's how you can do it

   $ cd
   $ wget
   $ tar -zxvf cmake-2.6.2-Linux-i386.tar.gz 

And now you are already ready to use it:

   $ cd src/my_project
   $ mkdir build
   $ cd build
   $ ~/cmake-2.6.2-Linux-i386/bin/cmake ..

Btw., this way it is also very easy to have multiple different versions of CMake on your system. In you can still get CMake 2.4.x, 2.2.x and back until the ancient version 1.2. Just download the packages (as shown above) and install them into separate directories e.g. in your HOME or at some other place.