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")