Skip to content

Commit

Permalink
add lib openthread-radio-spinel
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanglongxia committed Oct 18, 2023
1 parent e8b6114 commit 88188c6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/lib/spinel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
# POSSIBILITY OF SUCH DAMAGE.
#

add_library(openthread-radio-spinel)
add_library(openthread-spinel-ncp)
add_library(openthread-spinel-rcp)

Expand All @@ -37,6 +38,10 @@ target_compile_definitions(openthread-spinel-rcp PRIVATE
PUBLIC OPENTHREAD_SPINEL_CONFIG_OPENTHREAD_MESSAGE_ENABLE=0
)

target_compile_options(openthread-radio-spinel PRIVATE
${OT_CFLAGS}
)

target_compile_options(openthread-spinel-ncp PRIVATE
${OT_CFLAGS}
)
Expand All @@ -57,14 +62,17 @@ set(COMMON_SOURCES
spinel_encoder.cpp
)

target_include_directories(openthread-radio-spinel PUBLIC ${OT_PUBLIC_INCLUDES} PRIVATE ${COMMON_INCLUDES})
target_include_directories(openthread-spinel-ncp PUBLIC ${OT_PUBLIC_INCLUDES} PRIVATE ${COMMON_INCLUDES})
target_include_directories(openthread-spinel-rcp PUBLIC ${OT_PUBLIC_INCLUDES} PRIVATE ${COMMON_INCLUDES})

target_sources(openthread-radio-spinel PRIVATE radio_spinel.cpp)
target_sources(openthread-spinel-ncp PRIVATE ${COMMON_SOURCES})
target_sources(openthread-spinel-rcp
target_sources(openthread-spinel-rcp PRIVATE ${COMMON_SOURCES})

target_link_libraries(openthread-radio-spinel
PRIVATE
${COMMON_SOURCES}
radio_spinel.cpp
ot-config
)

target_link_libraries(openthread-spinel-ncp
Expand Down
1 change: 1 addition & 0 deletions src/posix/cli.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ target_link_libraries(ot-cli PRIVATE
openthread-posix
openthread-cli-ftd
openthread-hdlc
openthread-radio-spinel
openthread-spinel-rcp
${OT_MBEDTLS}
${READLINE_LINK_LIBRARIES}
Expand Down
1 change: 1 addition & 0 deletions src/posix/daemon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ target_link_libraries(ot-daemon PRIVATE
openthread-ftd
openthread-posix
openthread-hdlc
openthread-radio-spinel
openthread-spinel-rcp
${OT_MBEDTLS}
ot-posix-config
Expand Down
1 change: 1 addition & 0 deletions src/posix/platform/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ target_link_libraries(openthread-posix
openthread-cli-ftd
openthread-ftd
openthread-hdlc
openthread-radio-spinel
openthread-spinel-rcp
openthread-url
ot-config-ftd
Expand Down

0 comments on commit 88188c6

Please sign in to comment.