Visual Studio 删除了我的 CMake.exe

Visual Studio 删除了我的 CMake.exe

我正在从这里安装 OpenCV [非常过时]教程

我完成了配置步骤,一切似乎都很好,但是当我尝试构建 OpenCV.sln 时,我收到了一堆错误:

Checking Build System
'"C:\Program Files (x86)\CMake\bin\cmake.exe"' is not recognized as an internal or external command,
operable program or batch file.

... (etc)

========== Build: 0 succeeded, 63 failed, 0 up-to-date, 6 skipped ==========

它正在尝试查找 cmake.exe 文件,而该目录仅包含 cmake-gui.exe(似乎 cmake-gui.exe 是 Windows 版 Cmake 3.0.1 附带的唯一内容)。

我应该怎么办?安装旧版本的 cmake?重命名可执行文件?或者是否有某种方法可以让 Visual Studio 改用 cmake-gui.exe?

PS 我在 Windows 7 上,使用 Visual Studio 2010 Pro

编辑

哇哦。在 David 的帮助下,我下载并安装了 cmake.exe,并将其安装在正确的位置。现在,当我去构建 ZERO_CHECK 项目时,我得到了以下信息:

CustomBuild:
Checking Build System
Access is denied.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" exited with code 5.

Build FAILED.

并且(关键在于),cmake.exe 文件已经删除。它不见了。这是什么情况?我以管理员身份运行 Visual Studio,为什么访问会被拒绝?

答案1

cmake.exe不见了

cmake-3.0.1-win32-x86.zip来自的zip 文件http://www.cmake.org/cmake/resources/software.html子目录中包含以下文件bin

9,035,264 cmake-gui.exe
3,283,456 cmake.exe                         <------
  156,160 cmcldeps.exe
3,218,944 cpack.exe
3,696,640 ctest.exe
1,177,088 libeay32.dll
      524 Microsoft.VC90.CRT.manifest
  224,768 msvcm90.dll
  568,832 msvcp90.dll
  655,872 msvcr90.dll
  270,336 ssleay32.dll

相关内容