Hi,

I am using the standard autogenerated CMake-template, with vpckg.
Thus I have this line at the very top:

Qt Code:
  1. set(CMAKE_TOOLCHAIN_FILE "C:/vcpkg/scripts/buildsystems/vcpkg.cmake" CACHE STRING "")
To copy to clipboard, switch view to plain text mode 

Everything works fine when I open this in QtCreater 8 and build it.
For Kits, I have 5.15 and 6.2 installed from the online installer. I configure both in QtCreator and can then switch between them in the build menu.


This works fine ... as long as no Qt is installed in vcpkg. If I install "qtbase" vcpkg package (which contains Qt 6.3), then the build will *always* use this Qt installation, no matter what I select in Qt Creator (even when I select Qt 5.15).


How can I resolve this situation so that CMake prefers the online installer Kits from QtCreator over the vcpkg package?