0

So I've downloaded and unzipped the cmake zip so that I now have this folder cmake-3.20.1-windows-x86_64 on my c drive. but when I try to run cmake commands from the command line I get this error, "Cmake is not recognized as an internal or external command."

I tried adding it to the path like so set PATH=C:\cmake-3.20.1-windows-x86_64\bin%PATH% But then when I try to use cmake again I get the same error as before.

What do I need to do for cmake to work on the command line?

Dan Anderson
  • 1,062
  • 13
  • 26
  • Try printing your path. If that doesn't work reboot your terminal session. Adding bin to the path should be all you need. –  Apr 17 '21 at 03:08
  • CMake executable is written as `cmake`, not as `Cmake` as in your error message. – Tsyvarev Apr 17 '21 at 09:20
  • Is the missing semicolon between the CMake dir and the PATH variable a typo? Otherwise it should work this way from a console. – vre Apr 17 '21 at 09:49
  • 1
    You probably downloaded CMake source code. If you just want to use CMake, download a Windows installer. – arrowd Apr 19 '21 at 06:48

1 Answers1

1

You should download the Windows installer, available here under Binary distributions. You need the x86_64 installer if you're on a 64-bit Windows version, or the i386 installer if you're on a 32-bit Windows version (this should also work on 64-bit Windows versions).

For setting the path see this question.

icebp
  • 1,608
  • 1
  • 14
  • 24