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?
Run cmake-gui.exe, which should be in your Start menu under Program Files, there may also be a shortcut on your desktop, or if you built from source, it will be in the build directory.
CMake is a cross-platform build system generator. Projects specify their build process with platform-independent CMake listfiles included in each directory of a source tree with the name CMakeLists. txt . Users build a project by using CMake to generate a build system for a native tool on their platform.
The installation directory is usually left at its default, which is /usr/local . Installing software here ensures that it is automatically available to users. It is possible to specify a different installation directory by adding -DCMAKE_INSTALL_PREFIX=/path/to/install/dir to the CMake command line.
Running cmake-gui To use it, run cmake-gui , fill in the source and binary folder paths, then click Configure. If the binary folder doesn't exist, CMake will prompt you to create it. It will then ask you to select a generator.
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:
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.
cmake
is documented (type man cmake
and see also cmake.org) as being a command, so it should not have any GUI interface:
DESCRIPTION
The "cmake" executable is the CMake command-line interface. It may be
used to configure projects in scripts. Project configuration settings may be specified on the command line with the -D option.
And it is just generating a Makefile
(to be used by the make
command). I don't understand what kind of GUI are you expecting.
On Debian and derivatives like Ubuntu, you might install the cmake-gui
or cmake-qt-gui
package then run the cmake-gui
command.
And make
is often running GCC. Try make -p
to understand the default rules of GNU make... So read documentation of GNU make and of GCC (and probably of GDB).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With