2.1. CMake Installation¶
Obviously to use some tool you need to install it first. CMake can be installed using your default system package manager or by getting binaries from Download page.
2.1.1. Ubuntu¶
CMake can be installed by apt-get
:
> sudo apt-get -y install cmake
> which cmake
/usr/bin/cmake
> cmake --version
cmake version 2.8.12.2
Installing CMake GUI is similar:
> sudo apt-get -y install cmake-qt-gui
> which cmake-gui
/usr/bin/cmake-gui
> cmake-gui --version
cmake version 2.8.12.2
Binaries can be downloaded and unpacked manually to any location:
> wget https://cmake.org/files/v3.4/cmake-3.4.1-Linux-x86_64.tar.gz
> tar xf cmake-3.4.1-Linux-x86_64.tar.gz
> export PATH="`pwd`/cmake-3.4.1-Linux-x86_64/bin:$PATH" # save it in .bashrc if needed
> which cmake
/.../cmake-3.4.1-Linux-x86_64/bin/cmake
> which cmake-gui
/.../cmake-3.4.1-Linux-x86_64/bin/cmake-gui
Version:
> cmake --version
cmake version 3.4.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
> cmake-gui --version
cmake version 3.4.1
CMake suite maintained and supported by Kitware (kitware.com/cmake)
2.1.2. OS X¶
CMake can be installed on Mac using brew:
> brew install cmake
> which cmake
/usr/local/bin/cmake
> cmake --version
cmake version 3.4.1
CMake suite maintained and supported by Kitware (kitware.com/cmake)
Binaries can be downloaded and unpacked manually to any location:
> wget https://cmake.org/files/v3.4/cmake-3.4.1-Darwin-x86_64.tar.gz
> tar xf cmake-3.4.1-Darwin-x86_64.tar.gz
> export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
> which cmake
/.../cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin/cmake
> which cmake-gui
/.../cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin/cmake-gui
Version:
> cmake --version
cmake version 3.4.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
> cmake-gui --version
cmake version 3.4.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
2.1.2.1. DMG installer¶
Download cmake-*.dmg
installer from
Download page and run it.
Click Agree
:

Drag CMake.app
to Applications
folder (or any other location):

Start Launchpad
:

Find CMake
and launch it:

2.1.3. Windows¶
Download cmake-*.exe
installer from
Download page and run it.
Click Next
:

Click I agree
:

Check one of the Add CMake to the system PATH ...
if you want to have
CMake in PATH
. Check Create CMake Desktop Icon
to create icon on
desktop:

Choose installation path. Add suffix with version in case you want to have several versions installed simultaneously:

Shortcut in Start Menu folder:

Installing…

Click Finish:

Desktop icon created:

If you set Add CMake to the system PATH ...
checkbox then CMake can be
accessed via
terminal
(otherwise you need to add ...\bin
to
PATH environment variable):
> where cmake
C:\soft\develop\cmake\3.4.1\bin\cmake.exe
> where cmake-gui
C:\soft\develop\cmake\3.4.1\bin\cmake-gui.exe
> cmake --version
cmake version 3.4.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).