# CMake

## How do I install CMake?

| Reading time: | 10 min |
|----------------|---------|
| Last updated:  | 4 May 2026 |
| Ecosystem dashboard: | [View](https://developer.arm.com/ecosystem-dashboard/linux?package=cmake) |

| Author: | Jason Andrews, Arm [GitHub](https://github.com/jasonrandrews) [LinkedIn](https://linkedin.com/in/jason-andrews-7b05a8) |
| Official docs: | [View](https://cmake.org/documentation/) |
| Tags: | [CMake](https://learn.arm.com/tag/cmake) |

This guide shows you how to install and use the tool with the most common configuration. For advanced options and complete reference information, see the official documentation. Some install guides also include optional next steps to help you explore related workflows or integrations.

[CMake](https://cmake.org/) is an open-source, cross-platform build tool for software development projects, especially C and C++.

CMake is available on a variety of operating systems and can be installed in different ways. In this guide, you’ll learn how to install CMake for Arm Linux distributions and for Windows on Arm.

## Before you begin

If you’re installing CMake for Windows on Arm, ensure you are using a Windows on Arm device such as the Lenovo ThinkPad X13s or Surface Pro 9 with 5G.

If you’re installing CMake for Arm Linux, confirm you are using an Arm computer with 64-bit Linux by running:

```bash
uname -m
```

The output is similar to:

```
__output__ aarch64
```

If you see a different result, you are not using an Arm computer running 64-bit Linux.

## Download and install CMake on Windows on Arm

Native CMake support for Windows on Arm is available starting with version 3.24. Emulated CMake can be used but is no longer needed unless you need to use an older version of CMake.

The following steps install CMake version 4.3.1. To find the latest Windows on Arm installer, see [CMake download](https://cmake.org/download/).

To download and install CMake on Windows on Arm, follow these steps:

1. Download the [Windows ARM64 Installer](https://github.com/Kitware/CMake/releases/download/v4.3.1/cmake-4.3.1-windows-arm64.msi) and run it. The welcome screen will appear.

   ![Image Alt Text:A screenshot of the Windows CMake Setup Wizard welcome page that asks the user to click the Next button to contunue with installation.](https://cmake.org/)

2. Click **Next** and then accept the End-User License Agreement.
3. Under **Install Options**, to invoke CMake from any directory, select **Add CMake to the system PATH for the current user** and then click **Next**.
4. Follow the prompts to complete the installation. Wait for the installer to complete and then click **Finish**.

   ![Image Alt Text:A screenshot of the CMake Windows Setup Wizard that shows that the installation is complete and asks the user to click the Finish button to exit the Wizard.](https://cmake.org/)

## Download and install CMake on Linux

There are multiple ways to install CMake on Linux.

### Install CMake using the package manager

On Ubuntu and Debian, use `apt`:

```bash
sudo apt update
sudo apt install cmake -y
```

On Fedora and Amazon Linux 2023, use `dnf`:

```bash
sudo dnf install cmake -y
```

<ads-card>
<ads-card-label>Note</ads-card-label>
<ads-card-content>
<p>Depending on your Linux distribution, you may have a version of <code>cmake</code> which is too old or too new for your project.</p>
</ads-card-content>
</ads-card>

### Install CMake with Snap

By installing with `snap`, you get the latest version of `cmake`:

```bash
sudo snap install cmake --classic
```

With `snap`, the `cmake` executable is installed in `/snap/bin` which should already be in your search path.

### Use a specific CMake release from GitHub

To install a specific version of CMake from GitHub, follow these steps:

<ads-card>
<ads-card-label>Note</ads-card-label>
<ads-card-content>
<p>The following commands use CMake version 4.3.1. The same commands work with other versions. Replace the script used in these steps with the script for your version of choice. To find the latest version, see [CMake releases](https://github.com/Kitware/CMake/releases).</p>
</ads-card-content>
</ads-card>

1. Download a release from GitHub:

```bash
cd $HOME
wget -N https://github.com/Kitware/CMake/releases/download/v4.3.1/cmake-4.3.1-linux-aarch64.sh
```

2. Run the install script and set the search path:

```bash
mkdir cmake
bash /home/$USER/cmake-4.3.1-Linux-aarch64.sh --skip-license --exclude-subdir --prefix=$HOME/cmake
export PATH=$PATH:$HOME/cmake/bin
```

### Verify that CMake is installed

After installing CMake, run it to confirm it is installed and can be found:

```bash
cmake
```

The output is similar to:

```
__output__ Usage
__output__ 
__output__   cmake [options] <path-to-source>
__output__   cmake [options] <path-to-existing-build>
__output__   cmake [options] -S <path-to-source> -B <path-to-build>
__output__ 
__output__ Specify a source directory to (re-)generate a build system for it in the
__output__ current working directory.  Specify an existing build directory to
__output__ re-generate its build system.
__output__ 
__output__ Run 'cmake --help' for more information.
```

After confirming CMake can be found, print the version:

```bash
cmake --version
```

The output is similar to:

```
__output__ cmake version 4.3.1
__output__ 
__output__ CMake suite maintained and supported by Kitware (kitware.com/cmake).
```

You are now ready to use CMake.
