4f1a856dbf
* Philosophical: "explicit is better than implicit". * Practical: Allows useful errors if invalid directories given in components as the defaults aren't always used. Also trims the -I path from a number of components that have no actual include directory. * Simplifies knowing which components will be header-only and which won't
21 lines
491 B
CMake
21 lines
491 B
CMake
set(COMPONENT_SRCDIRS ".")
|
|
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})
|