Where is the CMake GUI for Linux?

vico picture vico · Sep 6, 2015 · Viewed 72.1k times · Source

I have CMake installed on my Ubuntu Linux. Trying to run CMake GUI in Linux. I found it works in Windows, but where to get it and how to run in Linux?

Answer

mark picture mark · Apr 8, 2016

Update: As of CMake 3.7.2, cmake-gui is still not built by default, but can easily be added to the build by specifying one additional flag. Qt is still required, I am using 4.8 but I'm sure other versions will work fine.

Download the source from the website, extract to a directory of your choosing, then run the following at the commmand line:

  • ./bootstrap --qt-gui
  • gmake
  • gmake install (optional - don't forget sudo if you need it)

Hey presto! cmake-gui is now present in the bin directory along with the other tools.

Note: if the build process fails in some way, just check the error message and work with it! There are too many pre-requisites and variables, attempting to detail them all would make the post tl;dr and would be out of date before being submitted (see one of the other posts for an example of this).


Basic installation for CMake

Under linux it comes with the default installation from the cmake website (at least for version 3.5.1)

It is installed in the same place as cmake, which on my machine is:

/usr/local/bin/cmake-gui

I built my cmake from source and by default, cmake-gui does not get built. To add as a target, the following variable must be set:

BUILD_QtDialog

eg. SET(BUILD_QtDialog TRUE) should do it

Note: cmake-gui is based on Qt so you must have Qt installed if you want to build it.