From f0d483aaa6d8af02d0218312faae3f1eac00954b Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 6 May 2019 16:50:24 +0300 Subject: [PATCH] lib: posix: Switch to use zephyr_interface_library_named cmake directive Similar to how other sub-libraries are defined in Zephyr tree, e.g. "fs", "lgvl", etc. This is supposed to help with the need to explicitly add posix include path to each and every application using POSIX subsys. Fixes: #15627 Signed-off-by: Paul Sokolovsky --- lib/posix/CMakeLists.txt | 2 +- lib/posix/Kconfig | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/posix/CMakeLists.txt b/lib/posix/CMakeLists.txt index 19fede849bf..ed9a7c416eb 100644 --- a/lib/posix/CMakeLists.txt +++ b/lib/posix/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 -add_library(posix_subsys INTERFACE) +zephyr_interface_library_named(posix_subsys) target_include_directories(posix_subsys INTERFACE ${ZEPHYR_BASE}/include/posix) diff --git a/lib/posix/Kconfig b/lib/posix/Kconfig index ef8e6063876..268a22a26f2 100644 --- a/lib/posix/Kconfig +++ b/lib/posix/Kconfig @@ -96,4 +96,12 @@ config POSIX_MAX_OPEN_FILES endif endif # FILE_SYSTEM +# The name of this option is mandated by zephyr_interface_library_named +# cmake directive. +config APP_LINK_WITH_POSIX_SUBSYS + bool "Make POSIX headers available to application" + default y + help + Add POSIX subsystem header files to the 'app' include path. + endif # POSIX_API