From: Adrian Freihofer <[email protected]> CMake Tools reads its user kits from XDG_DATA_HOME/CMakeTools if XDG_DATA_HOME is set and only falls back to ~/.local/share/CMakeTools. The shared sysroot mode always wrote to the fallback location, so the kit was not found by CMake Tools if XDG_DATA_HOME is set. Use the same location as CMake Tools.
Signed-off-by: Adrian Freihofer <[email protected]> --- scripts/lib/devtool/ide_plugins/ide_code.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/lib/devtool/ide_plugins/ide_code.py b/scripts/lib/devtool/ide_plugins/ide_code.py index 081dc08657..39356dcfb1 100644 --- a/scripts/lib/devtool/ide_plugins/ide_code.py +++ b/scripts/lib/devtool/ide_plugins/ide_code.py @@ -77,6 +77,7 @@ class IdeVSCode(IdeBase): A workspace cannot be created because there is no recipe that defines how a workspace could be set up. - cmake: adds a cmake-kit to .local/share/CMakeTools/cmake-tools-kits.json + (below XDG_DATA_HOME instead of .local/share if it is set) The cmake-kit uses the environment script and the tool-chain file generated by meta-ide-support. - meson: Meson needs manual workspace configuration. @@ -95,8 +96,10 @@ class IdeVSCode(IdeBase): deploy_dir_image = shared_env.ide_support.deploy_dir_image real_multimach_target_sys = shared_env.ide_support.real_multimach_target_sys standalone_sysroot_native = shared_env.build_sysroots.standalone_sysroot_native - vscode_ws_path = os.path.join( - os.environ['HOME'], '.local', 'share', 'CMakeTools') + # CMake Tools stores its user data in XDG_DATA_HOME, if it is set + data_home = os.environ.get('XDG_DATA_HOME') or os.path.join( + os.environ['HOME'], '.local', 'share') + vscode_ws_path = os.path.join(data_home, 'CMakeTools') cmake_kits_path = os.path.join(vscode_ws_path, 'cmake-tools-kits.json') oecmake_generator = "Ninja" env_script = os.path.join( -- 2.56.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#248627): https://lists.openembedded.org/g/openembedded-core/message/248627 Mute This Topic: https://lists.openembedded.org/mt/121932224/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
