From 890b2b89cacc6f2291596a001d555d374c8c9edd Mon Sep 17 00:00:00 2001 From: Maksims Svecovs Date: Tue, 4 Oct 2022 14:09:06 +0100 Subject: MLECO-3552: Workaround for toolchain preset There is a currently known bug that ${fileDir} in included presets evaluates to the path of parent file, not path of the file with ${fileDir} macro. To be able to use the toolchain preset in case of MLEK included as submodule - add an environment variable to be set by the parent project. Since this variable is not set by the MLEK project - it does not affect the functionality in MLEK. Signed-off-by: Maksims Svecovs Change-Id: I4b789a12533f0474ed5490cf7a793e953a110898 --- scripts/cmake/toolchains/toolchain-preset.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/toolchains/toolchain-preset.json b/scripts/cmake/toolchains/toolchain-preset.json index 728547f..30b5366 100644 --- a/scripts/cmake/toolchains/toolchain-preset.json +++ b/scripts/cmake/toolchains/toolchain-preset.json @@ -13,7 +13,7 @@ "cacheVariables": { "CMAKE_TOOLCHAIN_FILE": { "type": "STRING", - "value": "${sourceDir}/scripts/cmake/toolchains/bare-metal-gcc.cmake" + "value": "$env{MLEK_BASE_DIR}scripts/cmake/toolchains/bare-metal-gcc.cmake" } } }, @@ -24,7 +24,7 @@ "cacheVariables": { "CMAKE_TOOLCHAIN_FILE": { "type": "STRING", - "value": "${sourceDir}/scripts/cmake/toolchains/bare-metal-armclang.cmake" + "value": "$env{MLEK_BASE_DIR}scripts/cmake/toolchains/bare-metal-armclang.cmake" } } }, @@ -35,7 +35,7 @@ "cacheVariables": { "CMAKE_TOOLCHAIN_FILE": { "type": "STRING", - "value": "${sourceDir}/scripts/cmake/toolchains/native-gcc.cmake" + "value": "$env{MLEK_BASE_DIR}scripts/cmake/toolchains/native-gcc.cmake" } } } -- cgit v1.2.1