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 <paul.sokolovsky@linaro.org>
This commit is contained in:
parent
7d2df83b51
commit
f0d483aaa6
2 changed files with 9 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue