Image, you have multiple Qt builds of the same version, e.g. a shared and a static build. Then we currently generate something like this:
{
"name": "Qt-6.9.0-linux-clang",
...
"toolchainFile": "/home/jobor/dev/qt/dev-native/qtbase/lib/cmake/Qt6/qt.toolchain.cmake",
...
},
{
"name": "Qt-6.9.0-linux-clang",
...
"toolchainFile": "/home/jobor/dev/qt/dev-static/qtbase/lib/cmake/Qt6/qt.toolchain.cmake",
...
},
Both kits have the same name. After running "CMake: Scan for Kits" the second kit is removed.
We need to make sure to generate unique kit names. A very simple solution is to add a number at the end.
A user will want to have some say in how the kit is named though. One idea is to allow objects in qt-core.additionalPathNames. Something like
"qt-core.additionalQtPaths": [
"/home/egon/dev/qt/dev-native/qtbase/bin/qmake",
{
path: "/home/egon/dev/qt/dev-static/qtbase/bin/qmake",
name: "Qt-dev-static"
}
]
The above would create two kits: "Qt-6.9.0-linux-g++" and "Qt-dev-static".