[posix] fix OT_DAEMON flag definitions (#8203)

We have to add the `OPENTHREAD_POSIX_CONFIG_DAEMON_ENABLE` definition
to `ot-config` because OpenThread core libraries will set config file
to "openthrad-core-posix-config.h" which depends on
`OPENTHREAD_POSIX_CONFIG_DAEMON_ENABLE` to correctly enable
PLATFORM_NETIF and PLATFORM_UDP features. Otherwise, OpenThread core
and posix libraries will use different feature definitions.
This commit is contained in:
Kangping
2022-09-27 08:58:23 -07:00
committed by GitHub
parent e64ba13faa
commit ecdd5312a3
+8
View File
@@ -35,6 +35,14 @@ if(OT_DAEMON)
target_compile_definitions(ot-posix-config
INTERFACE "OPENTHREAD_POSIX_CONFIG_DAEMON_ENABLE=1"
)
# We have to add this definition to `ot-config` because openthread core
# libraries will set config file to "openthrad-core-posix-config.h" which
# depends on `OPENTHREAD_POSIX_CONFIG_DAEMON_ENABLE` to correctly enable
# PLATFORM_NETIF and PLATFORM_UDP features. Otherwise, openthread core and
# posix libraries will use different feature definitions.
list(APPEND OT_PLATFORM_DEFINES "OPENTHREAD_POSIX_CONFIG_DAEMON_ENABLE=1")
set(OT_PLATFORM_DEFINES ${OT_PLATFORM_DEFINES} PARENT_SCOPE)
endif()
option(OT_POSIX_INSTALL_EXTERNAL_ROUTES "Install External Routes as IPv6 routes" ON)