Open hwhsu1231 opened 2 years ago
@hwhsu1231 which Qt version do you use?
Typically the extension read the directory where the qt tools are automatically from the cmake build cache, so normally you don't need to configure anything.
Can you check if there are Qt variable in your cmake cache?
Here is what I test:
If I set the cmake.buildDirectory
only with those mentioned in the README.md
, the bottom status bar will show "Qt found".
"cmake.buildDirectory": "${workspaceFolder}/build/${buildType}"
If I set the cmake.buildDirectory
with other Variable Substitution, the bottom status bar will show "Qt not found".
"cmake.buildDirectory": "${workspaceFolder}/build/${buildKitTargetOs}-${buildKitVendor}-${buildKitTargetArch}-${buildType}"
By the way, the following are screenshots of my find_package()
in CMakeLists.txt
and Qt_DIR
in CMakeCache.txt
.
@tonka3000 How is this issue going?
@hwhsu1231 The variables are resolved by the cmake-extension itself. It seems that the vscode-cmake tools changed their behavior. Previously the buildDirectory
from the cmake-extension was set when something change in the settings.json
. Now it seems that it only set the buildDirectory
when you change the file and trigger cmake configure again. After that it works normally.
Please try this on your side
cmake.BuildDirectory
to whatever you want include the other variable you mentioned abovecmake: Configure
The current behavior is a fallback impl. when there is no cmake extension running. I can only support the given variables because cmake-tools has no APIs to get the other values.
Problem to solve
According to the
README.md
, it looks likeqt-tools
only supports${buildType}
,${buildKit}
, and${workspaceFolder}
now. If we use another Variable Substitution incmake.buildDirectory
, the bottom status bar ofqt-tools
will show "Qt not found". Therefore, we cannot use the command such asQt: Launch Qt Designer
.Can
qt-tools
support more Variable Substitution ofcmake-tools
?Screenshots
Platform and Version: