Alongside the source file, we need to provide CMake with a description of the operations to perform to configure the project for the build tools. The description is done in the CMake language, whose comprehensive documentation can be found online at https://cmake.org/cmake/help/latest/. We will place the CMake instructions into a file called CMakeLists.txt.
In detail, these are the steps to follow:
- Open a text file with your favorite editor. The name of this file will be CMakeLists.txt.
- The first line sets a minimum required version for CMake. A fatal error will be issued if a version of CMake lower than that is used: ...