mirror of
https://github.com/espressif/openthread.git
synced 2026-07-28 22:57:47 +00:00
[spinel] allow custom config file for lib spinel (#10449)
This commit is contained in:
@@ -26,6 +26,14 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
add_library(ot-lib-config INTERFACE)
|
||||
|
||||
set(OT_LIB_CONFIG "" CACHE STRING "Lib project-specific config header file")
|
||||
if (OT_LIB_CONFIG)
|
||||
target_compile_definitions(ot-lib-config INTERFACE "OPENTHREAD_PROJECT_LIB_CONFIG_FILE=\"${OT_LIB_CONFIG}\"")
|
||||
message(STATUS "OT_LIB_CONFIG=\"${OT_LIB_CONFIG}\"")
|
||||
endif()
|
||||
|
||||
add_subdirectory(hdlc)
|
||||
add_subdirectory(platform)
|
||||
add_subdirectory(spinel)
|
||||
|
||||
@@ -99,17 +99,23 @@ target_sources(openthread-spinel-ncp PRIVATE ${COMMON_SOURCES})
|
||||
target_sources(openthread-spinel-rcp PRIVATE ${COMMON_SOURCES})
|
||||
|
||||
target_link_libraries(openthread-radio-spinel
|
||||
INTERFACE
|
||||
ot-lib-config
|
||||
PRIVATE
|
||||
ot-config
|
||||
)
|
||||
|
||||
target_link_libraries(openthread-spinel-ncp
|
||||
INTERFACE
|
||||
ot-lib-config
|
||||
PRIVATE
|
||||
ot-config-ftd
|
||||
ot-config
|
||||
)
|
||||
|
||||
target_link_libraries(openthread-spinel-rcp
|
||||
INTERFACE
|
||||
ot-lib-config
|
||||
PRIVATE
|
||||
ot-config-radio
|
||||
ot-config
|
||||
|
||||
@@ -34,6 +34,14 @@
|
||||
#ifndef OPENTHREAD_SPINEL_CONFIG_H_
|
||||
#define OPENTHREAD_SPINEL_CONFIG_H_
|
||||
|
||||
/**
|
||||
* Include project specific lib config file if defined.
|
||||
*
|
||||
*/
|
||||
#ifdef OPENTHREAD_PROJECT_LIB_CONFIG_FILE
|
||||
#include OPENTHREAD_PROJECT_LIB_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_SPINEL_CONFIG_OPENTHREAD_MESSAGE_ENABLE
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user