From d94231f66ef396b854daf450c36b3e1f1130e262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B8e?= Date: Thu, 7 Jun 2018 10:31:14 +0200 Subject: [PATCH] cmake: libc: minimal: Move sources from 'app' to a new CMake library MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The minimal libc source files have been added to 'app'. The Zephyr build system should not be adding source files to the 'app' library unless necessary. This patch creates a new Zephyr CMake Library in lib/libc/minimal and adds the sources to it. Signed-off-by: Sebastian Bøe --- lib/libc/minimal/CMakeLists.txt | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/lib/libc/minimal/CMakeLists.txt b/lib/libc/minimal/CMakeLists.txt index 7c05a25b16..51637ecd21 100644 --- a/lib/libc/minimal/CMakeLists.txt +++ b/lib/libc/minimal/CMakeLists.txt @@ -1,13 +1,15 @@ -target_sources(app PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/source/stdlib/atoi.c - ${CMAKE_CURRENT_SOURCE_DIR}/source/stdlib/strtol.c - ${CMAKE_CURRENT_SOURCE_DIR}/source/stdlib/strtoul.c - ${CMAKE_CURRENT_SOURCE_DIR}/source/string/strncasecmp.c - ${CMAKE_CURRENT_SOURCE_DIR}/source/string/strstr.c - ${CMAKE_CURRENT_SOURCE_DIR}/source/string/string.c - ${CMAKE_CURRENT_SOURCE_DIR}/source/stdout/prf.c - ${CMAKE_CURRENT_SOURCE_DIR}/source/stdout/stdout_console.c - ${CMAKE_CURRENT_SOURCE_DIR}/source/stdout/sprintf.c - ${CMAKE_CURRENT_SOURCE_DIR}/source/stdout/fprintf.c -) zephyr_include_directories(include) + +zephyr_library() +zephyr_library_sources( + source/stdlib/atoi.c + source/stdlib/strtol.c + source/stdlib/strtoul.c + source/string/strncasecmp.c + source/string/strstr.c + source/string/string.c + source/stdout/prf.c + source/stdout/stdout_console.c + source/stdout/sprintf.c + source/stdout/fprintf.c +)