Skip to content

Commit

Permalink
lib: posix: Switch to use zephyr_interface_library_named cmake directive
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pfalcon authored and carlescufi committed Aug 8, 2019
1 parent 7d2df83 commit f0d483a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/posix/CMakeLists.txt
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0 # 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) target_include_directories(posix_subsys INTERFACE ${ZEPHYR_BASE}/include/posix)


Expand Down
8 changes: 8 additions & 0 deletions lib/posix/Kconfig
Expand Up @@ -96,4 +96,12 @@ config POSIX_MAX_OPEN_FILES
endif endif
endif # FILE_SYSTEM 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 endif # POSIX_API

0 comments on commit f0d483a

Please sign in to comment.