From 225f9b58eb4573e349d785eb022bba192ebc7dd6 Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Thu, 5 Mar 2020 11:07:10 -0800 Subject: [PATCH] [cmake] allow configuration of NCP defines (#4633) Signed-off-by: Markus Becker --- etc/cmake/options.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/etc/cmake/options.cmake b/etc/cmake/options.cmake index aee9ee01d..c5eff32ee 100644 --- a/etc/cmake/options.cmake +++ b/etc/cmake/options.cmake @@ -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")