Files
libmetal/cmake/syscheck.cmake
Andrew Davis 959fddbd70 Update build for latest Zephyr
The toolchain selection env var has been renamed
ZEPHYR_TOOLCHAIN_VARIANT, update the README.

Including boilerplate.cmake directly is deprecated, use
find_package(Zephyr).

Signed-off-by: Andrew Davis <afd@ti.com>
2024-04-11 11:11:34 +02:00

14 lines
446 B
CMake

# use "Generic" as CMAKE_SYSTEM_NAME
if (WITH_ZEPHYR)
set (CMAKE_SYSTEM_NAME "Generic" CACHE STRING "")
string (TOLOWER "Zephyr" PROJECT_SYSTEM)
string (TOUPPER "Zephyr" PROJECT_SYSTEM_UPPER)
if (NOT WITH_ZEPHYR_LIB)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
endif()
# map zephyr arch to libmetal machine
set (MACHINE "${CONFIG_ARCH}" CACHE STRING "")
endif (WITH_ZEPHYR)