# Install the 64-bit MinGW toolchain and CMake pacman -S --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja Use code with caution. 4. Verify the Installation
To actually build projects, you also need a compiler (GCC) and a build tool like Ninja or Make.
If the terminal closes automatically, reopen it and run pacman -Su to finish the core updates. 2. Choose the Right CMake Package download cmake msys2
How to Download and Install CMake on MSYS2 If you are developing C or C++ applications on Windows using the MSYS2 environment, you likely need CMake to manage your build process. MSYS2 provides a powerful package manager called pacman that makes downloading and installing CMake straightforward without needing to manualy download installers from external websites. Quick Install Command
Before installing new packages, always ensure your local package database is up to date. Open the terminal. Run the update command: pacman -Syu . # Install the 64-bit MinGW toolchain and CMake
For most users targeting native 64-bit Windows development, run this command in your terminal: pacman -S mingw-w64-x86_64-cmake Use code with caution. Step-by-Step Installation Guide
Check that CMake is correctly installed and accessible by running: cmake --version Use code with caution. If the terminal closes automatically, reopen it and
Use the mingw-w64-x86_64-cmake package. This version generates native Windows binaries and works best with the MinGW-w64 toolchain.