[cmake] allow configuration of NCP defines (#4633)

Signed-off-by: Markus Becker <[email protected]>
This commit is contained in:
Jonathan Hui
2020-03-05 11:07:10 -08:00
committed by GitHub
parent f88588e4b0
commit 225f9b58eb
+10
View File
@@ -136,6 +136,16 @@ if(OT_MTD_NETDIAG)
list(APPEND OT_PRIVATE_DEFINES "OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE=1")
endif()
option(OT_NCP "enable network co-processor NCP")
if(OT_NCP)
list(APPEND OT_PRIVATE_DEFINES "OPENTHREAD_ENABLE_NCP=1")
endif()
option(OT_NCP_RADIO_ONLY "run NCP in radio only mode")
if(OT_NCP_RADIO_ONLY)
list(APPEND OT_PRIVATE_DEFINES "OPENTHREAD_ENABLE_RADIO_ONLY=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")