Personal tools
You are here: Home / cmgui / Wiki / Linux instructions using CMake
Log in

Forgot your password?

Linux instructions using CMake

Building Cmgui using CMake

The following is a description of how to build Cmgui on Ubuntu 10.04 using CMake.

Software requirements

Here is a list of all the software required:

  • CMake
  • Subversion
  • GNU/make and make tools

Here is a list of commands I ran to install required packages that I was missing when building cmgui from source on a basic ubuntu 10.04 installation:

sudo apt-get install subversion
sudo apt-get install cmake-curses-gui
possibly some missing commands???

The bad news, the version of CMake distributed in Ubuntu 10.04 is not sufficient for Cmgui's purposes. Cmgui requires CMake version 2.8.4 which has support for decompressing bz2 tar files. To install CMake 2.8.4:

mkdir build
cd build
ccmake ../cmake-2.8.4
sudo make install


  • Make sure the CMAKE_INSTALL_PREFIX is set to '/usr/'

Environment Build Pre-requisites

When building Cmgui the environment variable:


is used to identify the location of several important dependencies. Defining this with as a system environment variable saves a bit of typing. Otherwise you need to input it in several places during the build. Also if any CMake dependencies are changed then it will also need to be set for CMake to make any changes.

So I use bash for my shell language and to set a location for CMISS_ROOT and to set an environment variable in the current shell I issue the following commands:

mkdir cmiss
export CMISS_ROOT=~/cmiss

Other shell languages may be different and you will need to check the documentation on what is required for your system.

Next I create the directory structure:

mkdir $CMISS_ROOT/src
mkdir $CMISS_ROOT/build

then using subversion I execute the following commands to checkout the required source code:

svn checkout cmake
cd src
svn checkout perl_interpreter
svn checkout third_party
svn checkout cmgui


  • Do you trust me? If you do accept server certificate permanently when asked. Choose the 'p' option.

Building Cmgui

To build Cmgui we first need to build it's dependencies namely the perl interpreter and the third party libraries. To build the perl interpreter:

mkdir $CMISS_ROOT/build/perl_interpreter
cd $CMISS_ROOT/build/perl_interpreter
cmake ../../src/perl_interpreter
make install

To build the third party libraries:

mkdir $CMISS_ROOT/build/third_party
cd $CMISS_ROOT/build/third_party
ccmake ../../src/third_party


  • Take care of the ccmake and not cmake command as used previously with the perl interpreter. Using ccmake brings up an ncurses gui that can be used to configure what is built, what is chosen here has repercussions for what capabilities Cmgui has. Any other CMake gui tool will also work.
  • The 'make' command kicks off the build there is no need for 'make install' this is done implicitly when using the third party CMakeLists.txt script.

Assuming all the dependencies have successfully built, you can build Cmgui:

mkdir $CMISS_ROOT/build/cmgui
cd $CMISS_ROOT/build/cmgui
ccmake ../../src/cmgui


  • Here again we use ccmake and not cmake. Configure Cmgui here to suit your purposes.