2020-06-09 23:22:04 +00:00
|
|
|
cmake_minimum_required(VERSION 3.13.1)
|
2018-08-18 12:51:13 +00:00
|
|
|
|
2020-06-09 23:28:09 +00:00
|
|
|
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
2017-11-17 18:23:45 +00:00
|
|
|
project(NONE)
|
|
|
|
|
|
|
|
target_sources(app PRIVATE src/zephyr_start.c src/zephyr_getchar.c)
|
|
|
|
|
|
|
|
add_library(libmicropython STATIC IMPORTED)
|
|
|
|
set_target_properties(libmicropython PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/libmicropython.a)
|
2018-08-18 12:51:13 +00:00
|
|
|
target_link_libraries(app PUBLIC libmicropython)
|
2017-11-17 18:23:45 +00:00
|
|
|
|
2017-12-06 13:31:07 +00:00
|
|
|
zephyr_get_include_directories_for_lang_as_string(C includes)
|
|
|
|
zephyr_get_system_include_directories_for_lang_as_string(C system_includes)
|
|
|
|
zephyr_get_compile_definitions_for_lang_as_string(C definitions)
|
|
|
|
zephyr_get_compile_options_for_lang_as_string(C options)
|
2017-11-17 18:23:45 +00:00
|
|
|
|
|
|
|
add_custom_target(
|
|
|
|
outputexports
|
|
|
|
COMMAND echo CC="${CMAKE_C_COMPILER}"
|
2019-04-06 21:24:55 +00:00
|
|
|
COMMAND echo AR="${CMAKE_AR}"
|
2017-12-06 14:45:27 +00:00
|
|
|
COMMAND echo Z_CFLAGS=${system_includes} ${includes} ${definitions} ${options}
|
2017-11-17 18:23:45 +00:00
|
|
|
VERBATIM
|
|
|
|
USES_TERMINAL
|
|
|
|
)
|