Iter Ator
Iter Ator

Reputation: 9299

vcpkg is not able to find cmake.cmd when installing a package

I tried to install vcpkg on Windows 10. I followed the steps of the Quick Start section, but I get an error, when I try to run this command:

.\vcpkg install sdl2 curl

Error:

error checking existence of file "C:\msys64\usr\bin\cmake.cmd" The filename, directory name, or volume label syntax is incorrect

I installed msys64 and cmake:

pacman -S cmake

But there is still no cmake.cmd in C:\msys64\usr\bin\, only a cmake.exe.

I tried to manualy create C:\msys64\usr\bin\cmake.cmd with this content:

if %1 == -E  (
cmake.exe  %* 
) else (
cmake.exe -G "NMake Makefiles"  -DWIN32=1 %*
)
pause 5

But I still get the same error.

Upvotes: 3

Views: 559

Answers (1)

Cosmin
Cosmin

Reputation: 21426

Looks like it defaulted to an incorrect configuration. It just needed to be specified manually.

msys is configured automatically. So first reverse its installation:

  • uninstall cmake
  • uninstall msys64

Then perform a clean install for Windows:

  • run bootstrap-vcpkg.bat
  • run vcpkg update
  • run vcpkg search sdl2
  • should find something, probably sdl2:x86-windows or sdl2:x64-windows, if it doesn't, it's a problem
  • run vcpkg install sdl2:x86-windows or vcpkg install sdl2:x64-windows
  • same for curl

Upvotes: 1

Related Questions