Skip to content

Commit

Permalink
cmake: Creating a single openthread_platform library
Browse files Browse the repository at this point in the history
RFC for zephyrproject-rtos#8441

The commit creates a single openthread_platform library for sources
under net/lib/openthread/platform folder in Zephyr as part of zephyrproject-rtos#8441

It uses the populate source list presented in: zephyrproject-rtos#8442

Signed-off-by: Torsten Rasmussen <[email protected]>
  • Loading branch information
tejlmand committed Dec 6, 2018
1 parent 478fb29 commit 52ddad6
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions subsys/net/lib/openthread/platform/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
zephyr_library_named(openthread_platform)
zephyr_library_sources(
alarm.c
flash.c
logging.c
misc.c
platform.c
radio.c
random.c
spi.c
)

zephyr_library_sources_ifdef(CONFIG_OPENTHREAD_SHELL shell.c)
zephyr_list(SOURCES
OUTPUT PRIVATE_SOURCES
alarm.c
flash.c
logging.c
misc.c
platform.c
radio.c
random.c
spi.c
IFDEF:${CONFIG_OPENTHREAD_SHELL} shell.c
)

add_library(openthread_platform STATIC ${PRIVATE_SOURCES})
target_link_libraries(openthread_platform PRIVATE zephyr_interface)
target_link_libraries(zephyr_app_linking INTERFACE openthread_platform)
# The source files here use header files from the OpenThread project
# target_link_libraries(app ot_lib) # Better?
add_dependencies(openthread_platform ot)

0 comments on commit 52ddad6

Please sign in to comment.