[tcp] link third_party TCPlp module in CMake build (#6925)

This commit changes the Makefiles so that the TCPlp module is linked
in to the code when building OpenThread using CMake. This is necessary
when script/build or script/cmake-build is used to build OpenThread.
This commit is contained in:
Sam Kumar
2021-08-16 18:28:11 -07:00
committed by GitHub
parent 306e030f96
commit c00c9afa45
3 changed files with 20 additions and 0 deletions
+1
View File
@@ -43,5 +43,6 @@ target_sources(openthread-ftd PRIVATE ${COMMON_SOURCES})
target_link_libraries(openthread-ftd
PRIVATE
${OT_MBEDTLS}
tcplp
ot-config
)
+1
View File
@@ -43,5 +43,6 @@ target_sources(openthread-mtd PRIVATE ${COMMON_SOURCES})
target_link_libraries(openthread-mtd
PRIVATE
${OT_MBEDTLS}
tcplp
ot-config
)
+18
View File
@@ -44,3 +44,21 @@ target_include_directories(${tcplp_static_target}
${OT_PUBLIC_INCLUDES}
$<TARGET_PROPERTY:ot-config,INTERFACE_INCLUDE_DIRECTORIES>
)
# TCPlp calls functions that are defined by the core OpenThread (like
# "otMessageWrite()"), so we need to add the core library (FTD or MTD, as
# appropriate) as a link dependency.
if(OT_FTD)
target_link_libraries(${tcplp_static_target}
PRIVATE
openthread-ftd
)
endif()
if(OT_MTD)
target_link_libraries(${tcplp_static_target}
PRIVATE
openthread-mtd
)
endif()