toolchain: Do not pollute TOOLCHAIN_HOME
Use it's own variable HOST_TOOLS_HOME for host tools and don't unconditionally set TOOLCHAIN_HOME, preventing the detection of llvm/clang host toolchain. Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
This commit is contained in:
parent
d4ce29243b
commit
de603c0c78
1 changed files with 5 additions and 5 deletions
|
@ -1,16 +1,16 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
set(TOOLCHAIN_HOME ${ZEPHYR_SDK_INSTALL_DIR}/sysroots/i686-pokysdk-mingw32)
|
set(HOST_TOOLS_HOME ${ZEPHYR_SDK_INSTALL_DIR}/sysroots/i686-pokysdk-mingw32)
|
||||||
else()
|
else()
|
||||||
set(TOOLCHAIN_HOME ${ZEPHYR_SDK_INSTALL_DIR}/sysroots/${TOOLCHAIN_ARCH}-pokysdk-linux)
|
set(HOST_TOOLS_HOME ${ZEPHYR_SDK_INSTALL_DIR}/sysroots/${TOOLCHAIN_ARCH}-pokysdk-linux)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Path used for searching by the find_*() functions, with appropriate
|
# Path used for searching by the find_*() functions, with appropriate
|
||||||
# suffixes added. Ensures that the SDK's host tools will be found when
|
# suffixes added. Ensures that the SDK's host tools will be found when
|
||||||
# we call, e.g. find_program(QEMU qemu-system-x86)
|
# we call, e.g. find_program(QEMU qemu-system-x86)
|
||||||
list(APPEND CMAKE_PREFIX_PATH ${TOOLCHAIN_HOME}/usr)
|
list(APPEND CMAKE_PREFIX_PATH ${HOST_TOOLS_HOME}/usr)
|
||||||
|
|
||||||
# TODO: Use find_* somehow for these as well?
|
# TODO: Use find_* somehow for these as well?
|
||||||
set_ifndef(QEMU_BIOS ${TOOLCHAIN_HOME}/usr/share/qemu)
|
set_ifndef(QEMU_BIOS ${HOST_TOOLS_HOME}/usr/share/qemu)
|
||||||
set_ifndef(OPENOCD_DEFAULT_PATH ${TOOLCHAIN_HOME}/usr/share/openocd/scripts)
|
set_ifndef(OPENOCD_DEFAULT_PATH ${HOST_TOOLS_HOME}/usr/share/openocd/scripts)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue