mirror of
https://github.com/espressif/openthread.git
synced 2026-08-23 02:39:52 +00:00
[cmake] add NCP vendor hook option from Zephyr (#4983)
Signed-off-by: Philipp Wohlgenannt <[email protected]>
This commit is contained in:
@@ -185,6 +185,11 @@ if(OT_PLATFORM_NETIF)
|
||||
list(APPEND OT_PRIVATE_DEFINES "OPENTHREAD_CONFIG_PLATFORM_NETIF_ENABLE=1")
|
||||
endif()
|
||||
|
||||
option(OT_NCP_VENDOR_HOOK_SOURCE "Enable vendor hook for NCP")
|
||||
if(OT_NCP_VENDOR_HOOK_SOURCE)
|
||||
list(APPEND OT_PRIVATE_DEFINES "OPENTHREAD_ENABLE_NCP_VENDOR_HOOK=1")
|
||||
endif()
|
||||
|
||||
option(OT_PLATFORM_UDP "enable platform UDP support")
|
||||
if(OT_PLATFORM_UDP)
|
||||
list(APPEND OT_PRIVATE_DEFINES "OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE=1")
|
||||
|
||||
@@ -85,6 +85,12 @@ set(COMMON_SOURCES
|
||||
ncp_uart.cpp
|
||||
)
|
||||
|
||||
if(DEFINED OT_NCP_VENDOR_HOOK_SOURCE)
|
||||
if(NOT OT_NCP_VENDOR_HOOK_SOURCE STREQUAL "OFF")
|
||||
list(APPEND COMMON_SOURCES ${OT_NCP_VENDOR_HOOK_SOURCE})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_include_directories(openthread-ncp-ftd PUBLIC ${OT_PUBLIC_INCLUDES} PRIVATE ${COMMON_INCLUDES})
|
||||
target_include_directories(openthread-ncp-mtd PUBLIC ${OT_PUBLIC_INCLUDES} PRIVATE ${COMMON_INCLUDES})
|
||||
target_include_directories(openthread-rcp PUBLIC ${OT_PUBLIC_INCLUDES} PRIVATE ${COMMON_INCLUDES})
|
||||
|
||||
Reference in New Issue
Block a user