Skip to main content
Visitor
August 7, 2026
Question

Title: cube-cmake.exe broken in stm32cube-ide-build-cmake 1.46.0 — "Could not find CMAKE_ROOT" on every configure

  • August 7, 2026
  • 1 reply
  • 37 views

Environment: Windows 11, VS Code, STM32CubeCLT 1.22.0, stm32cube-ide-build-cmake 1.46.0, stm32-vscode-extension 3.10.0

Symptom: Any CubeMX CMake project fails to configure with:

CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in

Root cause analysis: cube-cmake.exe is a self-contained binary embedding CMake 4.4.2, deployed at <ext>/resources/cube-cmake/win32/x86_64/. CMake's FindCMakeResourcesInInstallTree requires the executable directory to end with bin and <prefix>/share/cmake-4.4/Modules/CMake.cmake to exist. The shipped layout is neither bin-suffixed nor does it include share/cmake-4.4, and the companion cmake.exe is missing — so it fails on every run.

Workaround (local): rebuilding bin/ + share/cmake-4.4/ + companion cmake.exe + a junction makes it work.

Request: Please ship the full CMake resource tree (Modules/Templates) and companion cmake.exe with the extension, or have cube-cmake delegate to the CLT/bundle CMake.

1 reply

Cartu38 OpenDev
Graduate II
August 7, 2026

@WYM 

cube-cmake doesn't include cmake at all. This executable is just a thin wrapper to launch 'cube cmake'. Cmake binary itself is not served by CLT which is obsolete. It is served by so called STM32Cube bundle. Cmake bundle is the complete community one. In short your first guess analysis is kind of fully wrong.

 

Have a try to get a VS Code integrated terminal. Is 'cube cmake --version' is functional ?

If not you have a setup / install issue.