[cmake] add NCP vendor hook option from Zephyr (#4983)

Signed-off-by: Philipp Wohlgenannt <[email protected]>
This commit is contained in:
Philipp-Wohlgenannt-Tridonic-com
2020-05-25 15:58:06 -07:00
committed by GitHub
parent 657b4cb291
commit 7942b00eee
2 changed files with 11 additions and 0 deletions
+5
View File
@@ -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")
+6
View File
@@ -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})