build system: Initial cmake support, work in progress

This commit is contained in:
Angus Gratton
2018-01-12 13:49:13 +11:00
committed by Angus Gratton
parent a538644560
commit c671a0c3eb
56 changed files with 1115 additions and 5 deletions

View File

@@ -0,0 +1,20 @@
set(COMPONENT_ADD_INCLUDEDIRS platform_include include)
if(CONFIG_SPIRAM_CACHE_WORKAROUND)
set(LIBC c-psram-workaround)
set(LIBM m-psram-workaround)
else()
if(CONFIG_NEWLIB_NANO_FORMAT)
set(LIBC c_nano)
else()
set(LIBC c)
endif(CONFIG_NEWLIB_NANO_FORMAT)
set(LIBM m)
endif(CONFIG_SPIRAM_CACHE_WORKAROUND)
register_component()
target_link_libraries(newlib "-L ${CMAKE_CURRENT_SOURCE_DIR}/lib")
target_link_libraries(newlib ${LIBC} ${LIBM})