[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:
Mason Tran
2022-09-23 02:20:35 -04:00
committed by GitHub
parent da45d327c7
commit cc8e4cce15
21 changed files with 33 additions and 2 deletions
+3
View File
@@ -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)
+1
View File
@@ -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
)
+1
View File
@@ -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
)
+1
View File
@@ -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
)
+1
View File
@@ -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
)
+1
View File
@@ -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
)
+1
View File
@@ -43,6 +43,7 @@ target_link_libraries(ot-rcp PRIVATE
openthread-radio
${OT_PLATFORM_LIB_RCP}
openthread-rcp
ot-config-radio
ot-config
)
+1
View File
@@ -46,5 +46,6 @@ target_link_libraries(openthread-cli-ftd
openthread-ftd
PRIVATE
${OT_MBEDTLS}
ot-config-ftd
ot-config
)
+1
View File
@@ -46,5 +46,6 @@ target_link_libraries(openthread-cli-mtd
openthread-mtd
PRIVATE
${OT_MBEDTLS}
ot-config-mtd
ot-config
)
+1
View File
@@ -55,5 +55,6 @@ target_link_libraries(openthread-cli-radio
openthread-radio
PRIVATE
${OT_MBEDTLS_RCP}
ot-config-radio
ot-config
)
+1
View File
@@ -43,6 +43,7 @@ target_sources(openthread-ftd PRIVATE ${COMMON_SOURCES})
target_link_libraries(openthread-ftd
PRIVATE
${OT_MBEDTLS}
ot-config-ftd
ot-config
)
+1
View File
@@ -43,6 +43,7 @@ target_sources(openthread-mtd PRIVATE ${COMMON_SOURCES})
target_link_libraries(openthread-mtd
PRIVATE
${OT_MBEDTLS}
ot-config-mtd
ot-config
)
+1
View File
@@ -54,5 +54,6 @@ endif()
target_link_libraries(openthread-radio
PRIVATE
${OT_MBEDTLS_RCP}
ot-config-radio
ot-config
)
+1
View File
@@ -54,5 +54,6 @@ endif()
target_link_libraries(openthread-radio-cli
PRIVATE
${OT_MBEDTLS_RCP}
ot-config-radio
ot-config
)
+11 -2
View File
@@ -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
)
+1
View File
@@ -49,5 +49,6 @@ target_link_libraries(openthread-ncp-ftd
${OT_MBEDTLS}
openthread-hdlc
openthread-spinel-ncp
ot-config-ftd
ot-config
)
+1
View File
@@ -49,5 +49,6 @@ target_link_libraries(openthread-ncp-mtd
${OT_MBEDTLS}
openthread-hdlc
openthread-spinel-ncp
ot-config-mtd
ot-config
)
+1
View File
@@ -49,5 +49,6 @@ target_link_libraries(openthread-rcp
PRIVATE
openthread-hdlc
openthread-spinel-rcp
ot-config-radio
ot-config
)
+1
View File
@@ -53,6 +53,7 @@ target_link_libraries(ot-cli
openthread-spinel-rcp
${OT_MBEDTLS}
${READLINE_LINK_LIBRARIES}
ot-config-ftd
ot-config
)
+1
View File
@@ -45,6 +45,7 @@ target_link_libraries(ot-daemon PRIVATE
openthread-spinel-rcp
${OT_MBEDTLS}
ot-posix-config
ot-config-ftd
ot-config
)
+1
View File
@@ -121,6 +121,7 @@ target_link_libraries(openthread-posix
openthread-platform
PRIVATE
openthread-url
ot-config-ftd
ot-config
ot-posix-config
util