Reputation: 437
I have installed CMake and cmake.exe is in C:\Program Files (x86)\CMake\bin
But when I run call cmake %CMAKE_BUILD_OPTIONS%
through a bat file I am getting an error message
'cmake' is not recognized as an internal or external command, operable program or batch file.
Should I set this path in environment variable?
Upvotes: 9
Views: 68622
Reputation: 87
You can install cmake
with the built-in windows package manager winget
by running this in a command line application:
winget install cmake
You'll need to restart your command line application or open another tab for cmake
to be accessible after that.
Upvotes: 0
Reputation: 440
in case someone install the Windows C++ Build Tools / Visual Studio, check out this answer https://stackoverflow.com/a/69324180/10805680
Upvotes: 1
Reputation: 1680
Was able to resolve the issue by installing Chocolatey (on Windows 10) and running choco install cmake
Upvotes: 8
Reputation: 437
It resolved after adding C:\Program Files (x86)\CMake\bin
to environment variable PATH
.
Upvotes: 18