I had to install vcpkg yesterday for the first time. Well, actually, I ran into a problem last week that could have been solved by installing vcpkg. I also happened to read a comment here on hacker news recently that mentioned vcpkg (but I didn't know what it was).
The problem was that 'cargo install cargo-show' wanted access to an OpenSSL installation (under Windows). The long error spew did mention vcpkg once or twice so I googled it and got very confused by the readme.
So I tried to install OpenSSL without vcpkg. That worked ('winget install openssl') but 'cargo install cargo-show' still didn't. Perhaps I had set up some environment variables wrong.
Yesterday, I finally figured out how to install vcpkg and it was indeed very simple, despite its readme. 'cargo install cargo-show' still didn't work -- it couldn't find openssl installed with the right "triplet" even though it was clearly installed in a way that should work for all 64-bit x86 Windows.
Setting OPENSSL_DIR and then running 'cargo install cargo-show' worked perfectly.
Apparently, there are different ways the directory structure for a vcpkg installed package can look and the vcpkg/openssl gave me one and the build script for one of the dependencies of cargo-show expected another.
Very, very confusing.
I think you can get away with just using 'winget install cmake' and then invoking cmake with the right command line to make it play nice with vcpkg (and that command line is listed in several places). I haven't tried it, though.
'vcpkg integrate install' sets up some sort of secret integration with Visual Studio -- maybe vcpkg learns where VS libraries and binaries (compilers/linkers) are hidden and maybe Visual Studio learns how to invoke vcpkg.
If you run it, it will also tell you to how to integrate more explicitly with cmake:
$ vcpkg integrate install
Applied user-wide integration for this vcpkg root.
CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=/workspaces/vcpkg/scripts/buildsystems/vcpkg.cmake"
I hope this makes it slightly less confusing.