mirror of
https://github.com/espressif/openthread.git
synced 2026-08-03 01:17:46 +00:00
[cmake] disable OPENTHREAD_CONFIG_NCP_HDLC_ENABLE when OT_NCP_SPI is set (#8282)
This commit is contained in:
@@ -31,13 +31,19 @@ add_library(openthread-spinel-rcp)
|
||||
|
||||
target_compile_definitions(openthread-spinel-ncp PRIVATE
|
||||
OPENTHREAD_FTD=1
|
||||
OPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1
|
||||
PUBLIC OPENTHREAD_SPINEL_CONFIG_OPENTHREAD_MESSAGE_ENABLE=1
|
||||
)
|
||||
|
||||
if (OT_NCP_SPI)
|
||||
target_compile_definitions(openthread-spinel-ncp PRIVATE OPENTHREAD_CONFIG_NCP_HDLC_ENABLE=0)
|
||||
target_compile_definitions(openthread-spinel-rcp PRIVATE OPENTHREAD_CONFIG_NCP_HDLC_ENABLE=0)
|
||||
else()
|
||||
target_compile_definitions(openthread-spinel-ncp PRIVATE OPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1)
|
||||
target_compile_definitions(openthread-spinel-rcp PRIVATE OPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(openthread-spinel-rcp PRIVATE
|
||||
OPENTHREAD_RADIO=1
|
||||
OPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1
|
||||
PUBLIC OPENTHREAD_SPINEL_CONFIG_OPENTHREAD_MESSAGE_ENABLE=0
|
||||
)
|
||||
|
||||
|
||||
+10
-2
@@ -31,9 +31,14 @@ add_library(openthread-rcp)
|
||||
target_compile_definitions(openthread-rcp PRIVATE
|
||||
OPENTHREAD_RADIO=1
|
||||
OPENTHREAD_RADIO_CLI=0
|
||||
OPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1
|
||||
)
|
||||
|
||||
if (OT_NCP_SPI)
|
||||
target_compile_definitions(openthread-rcp PRIVATE OPENTHREAD_CONFIG_NCP_HDLC_ENABLE=0)
|
||||
else()
|
||||
target_compile_definitions(openthread-rcp PRIVATE OPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1)
|
||||
endif()
|
||||
|
||||
target_compile_options(openthread-rcp PRIVATE
|
||||
${OT_CFLAGS}
|
||||
)
|
||||
@@ -47,8 +52,11 @@ target_link_libraries(openthread-rcp
|
||||
PUBLIC
|
||||
openthread-radio
|
||||
PRIVATE
|
||||
openthread-hdlc
|
||||
openthread-spinel-rcp
|
||||
ot-config-radio
|
||||
ot-config
|
||||
)
|
||||
|
||||
if(NOT OT_NCP_SPI)
|
||||
target_link_libraries(openthread-rcp PRIVATE openthread-hdlc)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user