# https://github.com/picolibc/picolibc/issues/696 include(ExternalProject) ExternalProject_Add(picolibc PREFIX "${CMAKE_CURRENT_BINARY_DIR}" SOURCE_DIR "${CMAKE_SOURCE_DIR}/3rd-party/picolibc" CONFIGURE_COMMAND meson setup \ --cross-file "${CMAKE_CURRENT_SOURCE_DIR}/cross-cortex-m0-none-eabi.txt" \ -Dc_args=-funwind-tables \ -Dc_args=-mpoke-function-name \ -Dmultilib=false \ -Dprefix="${CMAKE_CURRENT_BINARY_DIR}" \ -Dincludedir=arm-none-eabi/include \ -Dlibdir=arm-none-eabi/lib \ -Dspecsdir=arm-none-eabi/lib \ "${CMAKE_SOURCE_DIR}/3rd-party/picolibc" BUILD_COMMAND ninja INSTALL_COMMAND ninja install LOG_CONFIGURE false LOG_BUILD false LOG_INSTALL false )