Search⌘ K
AI Features

Installing CMake

Explore the various methods to install CMake across different environments including Docker containers, Windows installers, Linux package managers, and macOS tools. Understand how to prepare your system with compilers and environment variables for seamless C++ build configuration.

CMake is a cross-platform, open-source software written in C++. That means you can, of course, compile it yourself; however, the most likely scenario is that you won't have to. This is because precompiled binaries are available for you to download from the official web page.

Unix-based systems provide ready-to-install packages directly from the command line.

Note: Remember that CMake doesn't come with compilers. If your system doesn't have them installed yet, you'll need to provide them before using CMake. Make sure to add the paths to their executables to the PATH environment variable so that CMake can find them.

To avoid solving tooling and dependency problems while learning from this course, we recommend choosing the first installation method: Docker.

Let's go through different environments in which CMake can be used.

Docker

Docker is a cross-platform tool that provides OS-level virtualization, allowing applications to be shipped in complete ...