From c8296594df4cfc66acdb908c7f311980674f5cb5 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Tue, 22 May 2018 10:52:12 -0500 Subject: [PATCH] ext: libmetal: Change build integration so its not recursive With recent changes to libmetal we can now include and build it directly as a zephyr library rather than doing a recursive make. We remove ext/hal/libmetal.cmake as part of this change and introduce a Kconfig option for libmetal. This is a partial fix for issue #7673. Signed-off-by: Kumar Gala --- CMakeLists.txt | 12 ++++++++++++ Kconfig | 12 ++++++++++++ libmetal.cmake | 12 ------------ 3 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 CMakeLists.txt create mode 100644 Kconfig delete mode 100644 libmetal.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..5dacbd9 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,12 @@ +# +# Copyright (c) 2018 Linaro Limited +# +# SPDX-License-Identifier: Apache-2.0 +# + +set(WITH_ZEPHYR 1) +set(WITH_ZEPHYR_LIB 1) +set(WITH_DOC OFF CACHE BOOL "" FORCE) +set(WITH_DEFAULT_LOGGER OFF CACHE BOOL "" FORCE) + +add_subdirectory(libmetal) diff --git a/Kconfig b/Kconfig new file mode 100644 index 0000000..70977cf --- /dev/null +++ b/Kconfig @@ -0,0 +1,12 @@ +# +# Copyright (c) 2018 Linaro Limited +# +# SPDX-License-Identifier: Apache-2.0 +# + +config LIBMETAL + bool + prompt "libmetal Support" + default n + help + This option enables the libmetal HAL abstraction layer diff --git a/libmetal.cmake b/libmetal.cmake deleted file mode 100644 index 0a78160..0000000 --- a/libmetal.cmake +++ /dev/null @@ -1,12 +0,0 @@ -include(ExternalProject) - -ExternalProject_Add( - libmetal # Name for custom target - SOURCE_DIR $ENV{ZEPHYR_BASE}/ext/hal/libmetal/libmetal/ - INSTALL_COMMAND "" # This particular build system has no install command - CMAKE_ARGS -DWITH_ZEPHYR=ON -DBOARD=${BOARD} -DWITH_DEFAULT_LOGGER=OFF -DWITH_DOC=OFF - ) - -ExternalProject_Get_property(libmetal BINARY_DIR) -set(LIBMETAL_INCLUDE_DIR ${BINARY_DIR}/lib/include) -set(LIBMETAL_LIBRARY ${BINARY_DIR}/lib/libmetal.a)