mirror of
https://github.com/espressif/openthread.git
synced 2026-06-05 21:14:49 +00:00
[cmake] add interface libraries ot-config-(ftd|mtd|radio) (#8190)
This allows for more granular control of any configuration which might need to be incorporated in the core library build.
This commit is contained in:
@@ -40,6 +40,9 @@ set(OT_EXTERNAL_MBEDTLS "" CACHE STRING "Specify external mbedtls library")
|
||||
option(OT_MBEDTLS_THREADING "enable mbedtls threading" OFF)
|
||||
|
||||
add_library(ot-config INTERFACE)
|
||||
add_library(ot-config-ftd INTERFACE)
|
||||
add_library(ot-config-mtd INTERFACE)
|
||||
add_library(ot-config-radio INTERFACE)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
|
||||
@@ -44,6 +44,7 @@ target_link_libraries(ot-cli-ftd PRIVATE
|
||||
${OT_PLATFORM_LIB_FTD}
|
||||
openthread-cli-ftd
|
||||
${OT_MBEDTLS}
|
||||
ot-config-ftd
|
||||
ot-config
|
||||
)
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ target_link_libraries(ot-cli-mtd PRIVATE
|
||||
${OT_PLATFORM_LIB_MTD}
|
||||
openthread-cli-mtd
|
||||
${OT_MBEDTLS}
|
||||
ot-config-mtd
|
||||
ot-config
|
||||
)
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ target_link_libraries(ot-cli-radio PRIVATE
|
||||
${OT_PLATFORM_LIB_RCP}
|
||||
openthread-cli-radio
|
||||
${OT_MBEDTLS_RCP}
|
||||
ot-config-radio
|
||||
ot-config
|
||||
)
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ target_link_libraries(ot-ncp-ftd PRIVATE
|
||||
${OT_PLATFORM_LIB_FTD}
|
||||
openthread-ncp-ftd
|
||||
${OT_MBEDTLS}
|
||||
ot-config-ftd
|
||||
ot-config
|
||||
)
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ target_link_libraries(ot-ncp-mtd PRIVATE
|
||||
${OT_PLATFORM_LIB_MTD}
|
||||
openthread-ncp-mtd
|
||||
${OT_MBEDTLS}
|
||||
ot-config-mtd
|
||||
ot-config
|
||||
)
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ target_link_libraries(ot-rcp PRIVATE
|
||||
openthread-radio
|
||||
${OT_PLATFORM_LIB_RCP}
|
||||
openthread-rcp
|
||||
ot-config-radio
|
||||
ot-config
|
||||
)
|
||||
|
||||
|
||||
@@ -46,5 +46,6 @@ target_link_libraries(openthread-cli-ftd
|
||||
openthread-ftd
|
||||
PRIVATE
|
||||
${OT_MBEDTLS}
|
||||
ot-config-ftd
|
||||
ot-config
|
||||
)
|
||||
|
||||
@@ -46,5 +46,6 @@ target_link_libraries(openthread-cli-mtd
|
||||
openthread-mtd
|
||||
PRIVATE
|
||||
${OT_MBEDTLS}
|
||||
ot-config-mtd
|
||||
ot-config
|
||||
)
|
||||
|
||||
@@ -55,5 +55,6 @@ target_link_libraries(openthread-cli-radio
|
||||
openthread-radio
|
||||
PRIVATE
|
||||
${OT_MBEDTLS_RCP}
|
||||
ot-config-radio
|
||||
ot-config
|
||||
)
|
||||
|
||||
@@ -43,6 +43,7 @@ target_sources(openthread-ftd PRIVATE ${COMMON_SOURCES})
|
||||
target_link_libraries(openthread-ftd
|
||||
PRIVATE
|
||||
${OT_MBEDTLS}
|
||||
ot-config-ftd
|
||||
ot-config
|
||||
)
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ target_sources(openthread-mtd PRIVATE ${COMMON_SOURCES})
|
||||
target_link_libraries(openthread-mtd
|
||||
PRIVATE
|
||||
${OT_MBEDTLS}
|
||||
ot-config-mtd
|
||||
ot-config
|
||||
)
|
||||
|
||||
|
||||
@@ -54,5 +54,6 @@ endif()
|
||||
target_link_libraries(openthread-radio
|
||||
PRIVATE
|
||||
${OT_MBEDTLS_RCP}
|
||||
ot-config-radio
|
||||
ot-config
|
||||
)
|
||||
|
||||
@@ -54,5 +54,6 @@ endif()
|
||||
target_link_libraries(openthread-radio-cli
|
||||
PRIVATE
|
||||
${OT_MBEDTLS_RCP}
|
||||
ot-config-radio
|
||||
ot-config
|
||||
)
|
||||
|
||||
@@ -67,5 +67,14 @@ target_include_directories(openthread-spinel-rcp PUBLIC ${OT_PUBLIC_INCLUDES} PR
|
||||
target_sources(openthread-spinel-ncp PRIVATE ${COMMON_SOURCES})
|
||||
target_sources(openthread-spinel-rcp PRIVATE ${COMMON_SOURCES})
|
||||
|
||||
target_link_libraries(openthread-spinel-ncp PRIVATE ot-config)
|
||||
target_link_libraries(openthread-spinel-rcp PRIVATE ot-config)
|
||||
target_link_libraries(openthread-spinel-ncp
|
||||
PRIVATE
|
||||
ot-config-ftd
|
||||
ot-config
|
||||
)
|
||||
|
||||
target_link_libraries(openthread-spinel-rcp
|
||||
PRIVATE
|
||||
ot-config-radio
|
||||
ot-config
|
||||
)
|
||||
|
||||
@@ -49,5 +49,6 @@ target_link_libraries(openthread-ncp-ftd
|
||||
${OT_MBEDTLS}
|
||||
openthread-hdlc
|
||||
openthread-spinel-ncp
|
||||
ot-config-ftd
|
||||
ot-config
|
||||
)
|
||||
|
||||
@@ -49,5 +49,6 @@ target_link_libraries(openthread-ncp-mtd
|
||||
${OT_MBEDTLS}
|
||||
openthread-hdlc
|
||||
openthread-spinel-ncp
|
||||
ot-config-mtd
|
||||
ot-config
|
||||
)
|
||||
|
||||
@@ -49,5 +49,6 @@ target_link_libraries(openthread-rcp
|
||||
PRIVATE
|
||||
openthread-hdlc
|
||||
openthread-spinel-rcp
|
||||
ot-config-radio
|
||||
ot-config
|
||||
)
|
||||
|
||||
@@ -53,6 +53,7 @@ target_link_libraries(ot-cli
|
||||
openthread-spinel-rcp
|
||||
${OT_MBEDTLS}
|
||||
${READLINE_LINK_LIBRARIES}
|
||||
ot-config-ftd
|
||||
ot-config
|
||||
)
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ target_link_libraries(ot-daemon PRIVATE
|
||||
openthread-spinel-rcp
|
||||
${OT_MBEDTLS}
|
||||
ot-posix-config
|
||||
ot-config-ftd
|
||||
ot-config
|
||||
)
|
||||
|
||||
|
||||
@@ -121,6 +121,7 @@ target_link_libraries(openthread-posix
|
||||
openthread-platform
|
||||
PRIVATE
|
||||
openthread-url
|
||||
ot-config-ftd
|
||||
ot-config
|
||||
ot-posix-config
|
||||
util
|
||||
|
||||
Reference in New Issue
Block a user