From 1f2a315acf67d99abc44600c1546c175c5fabf85 Mon Sep 17 00:00:00 2001 From: Luis Ubieda Date: Fri, 22 Jul 2022 01:25:08 -0400 Subject: [PATCH] [cmake] update option to enable CoAP Observe through CMake (#7932) Change the definition of OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE through target_compile_detinifions(). Signed-off-by: Luis Ubieda --- etc/cmake/options.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/cmake/options.cmake b/etc/cmake/options.cmake index d35b5d411..521b7fa5c 100644 --- a/etc/cmake/options.cmake +++ b/etc/cmake/options.cmake @@ -134,7 +134,7 @@ endif() option(OT_COAP_OBSERVE "enable coap observe (RFC7641) api support") if(OT_COAP_OBSERVE) - list(APPEND OT_PRIVATE_DEFINES "OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE=1") + target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE=1") endif() option(OT_COMMISSIONER "enable commissioner support")