cmake: use ZEPHYR_SDK_INSTALL_DIR instead of TOOLCHAIN_HOME

Zephyr SDK specifies TOOLCHAIN_HOME in cmake/zephyr/generic.cmake for
use in Zephyr.

But when specifying Zephyr SDK contolled variables isuch as SYSROOT_DIR
or CROSS_COMPILE, then the Zephyr SDK should rightfully use
ZEPHYR_SDK_INSTALL_DIR instead.
The use of TOOLCHAIN_HOME stems from the time when the Zephyr SDK cmake
code was present in the Zephyr repo and not part of the Zephyr SDK
itself.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
Torsten Rasmussen 2023-06-02 13:52:35 +02:00 committed by Anas Nashif
parent 38f41dad1d
commit df84cbcd7d
1 changed files with 2 additions and 2 deletions

View File

@ -26,8 +26,8 @@ set(CROSS_COMPILE_TARGET_sparc sparc-zephyr-elf)
set(CROSS_COMPILE_TARGET ${CROSS_COMPILE_TARGET_${ARCH}})
set(SYSROOT_TARGET ${CROSS_COMPILE_TARGET})
set(SYSROOT_DIR ${TOOLCHAIN_HOME}/${SYSROOT_TARGET}/${SYSROOT_TARGET})
set(CROSS_COMPILE ${TOOLCHAIN_HOME}/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMPILE_TARGET}-)
set(SYSROOT_DIR ${ZEPHYR_SDK_INSTALL_DIR}/${SYSROOT_TARGET}/${SYSROOT_TARGET})
set(CROSS_COMPILE ${ZEPHYR_SDK_INSTALL_DIR}/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMPILE_TARGET}-)
if("${ARCH}" STREQUAL "x86")
if(CONFIG_X86_64)