How to Install CMake on Ubuntu 20.04
The CMake project is an open-source cross-platform program that builds automation, testing, packaging, and installing software in a compiler-independent way. In fact, CMake isn’t a build system, but rather it helps generate build files for another system. CMake is unique compared to other build tools. Making makefiles and building them is possible, but you can also tell CMake to make a visual studio solution instead. For external programs, you have the same option. They are the choice of the maintainer of the library you use and there are no standards for things like code generation.
We will now look at how to install CMake on Ubuntu 20.
Step 1: Configure VPSie cloud server
- Sign in to your system or register a newly created one by logging in to your VPSie account.
- Connect by SSH using the credentials we emailed you.
- Once you have logged into your Ubuntu instance, run these commands to update your system.
# apt-get update && apt-get upgrade -y
Step 2: Install build tools and libraries
Run the following command to install this,
# sudo apt-get install build-essential libssl-dev
Step 3: Install CMake
The first step is to navigate to the temp directory:
# cd /tmp
To obtain the source code, type the following command:
# wget https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0.tar.gz
Run the following command to extract it:
# tar -zxvf cmake-3.20.0.tar.gz
After that, move to the extracted folder as follows:
# cd cmake-3.20.0
Install CMake with the following commands:
Once bootstrapped, run the following command:
Installation is as follows:
# sudo make install
Step 4: Check the installation
Execute the following command:
# cmake --version
Your system is now running Cmake, you can use it now. Thanks for reading! I hope it was informative for you!