summaryrefslogtreecommitdiff
path: root/build-aux/picolibc/CMakeLists.txt
blob: e67347ce8365c0eb4224b4da8de1dc625b1f9e2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 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
)