Using the CMake GUI on Windows, if I select "Specify toolchain file for cross-compiling" I can then provide the explicit path to my vcpkg.cmake file, and my project will Configure, Generate, build and run.
If I instead provide the path using the vcpkg environment variable %VCPKG_ROOT%
:
%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake
...the CMake Configure step fails with the message:
CMake Error at C:/Program Files/CMake/share/cmake3.23/Modules/CMakeDetermineSystem.cmake:130 (message):
Could not find toolchain file:
%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake
Call Stack (most recent call first):
CMakeLists.txt:9 (project)
Is there a way to use the vcpkg environment variable here?