diff --git a/src/posix/CMakeLists.txt b/src/posix/CMakeLists.txt index 907e84c06..978bb9fd6 100644 --- a/src/posix/CMakeLists.txt +++ b/src/posix/CMakeLists.txt @@ -26,6 +26,10 @@ # POSSIBILITY OF SUCH DAMAGE. # +target_compile_definitions(ot-config INTERFACE + OPENTHREAD_CONFIG_UART_CLI_RAW=1 +) + set(COMMON_INCLUDES ${OT_PUBLIC_INCLUDES} ${PROJECT_SOURCE_DIR}/src diff --git a/src/posix/cli.cmake b/src/posix/cli.cmake index 46c19f2a6..811be2989 100644 --- a/src/posix/cli.cmake +++ b/src/posix/cli.cmake @@ -26,10 +26,6 @@ # POSSIBILITY OF SUCH DAMAGE. # -target_compile_definitions(ot-config INTERFACE - OPENTHREAD_CONFIG_UART_CLI_RAW=1 -) - add_executable(ot-cli main.c $<$:console_cli.cpp>