mirror of
https://github.com/espressif/openthread.git
synced 2026-08-19 08:59:52 +00:00
[cmake] fix platform-utils for cmake (#4112)
platform-utils has a dependency on the core ot library, which was causing the build to fail. I have resolved this by making platform-utils an 'object library', which means the object files will always be used by the linker, preventing the 'smart linker' errors that occur with ld and cyclic dependencies. I also provided a static (.a) implementation of the library in case any non-cmake project wanted to consume the results (at which point that project can deal with the dependency as it wishes). So now it is up to the 'platform layer' to include the 'platform utils' objects inside its own library if it requires them. I have implemented this for the current cmake example platforms.
This commit is contained in:
committed by
Jonathan Hui
parent
3807daa68a
commit
24bd599b45
@@ -48,7 +48,6 @@ target_link_libraries(ot-cli-ftd
|
||||
openthread-cli-ftd
|
||||
${OT_PLATFORM_LIB}
|
||||
openthread-ftd
|
||||
openthread-platform-utils
|
||||
${OT_PLATFORM_LIB}
|
||||
mbedcrypto
|
||||
)
|
||||
@@ -57,7 +56,6 @@ target_link_libraries(ot-cli-mtd
|
||||
openthread-cli-mtd
|
||||
${OT_PLATFORM_LIB}
|
||||
openthread-mtd
|
||||
openthread-platform-utils
|
||||
${OT_PLATFORM_LIB}
|
||||
mbedcrypto
|
||||
)
|
||||
|
||||
@@ -53,7 +53,6 @@ target_link_libraries(ot-ncp-ftd
|
||||
openthread-ncp-ftd
|
||||
${OT_PLATFORM_LIB}
|
||||
openthread-ftd
|
||||
openthread-platform-utils
|
||||
${OT_PLATFORM_LIB}
|
||||
mbedcrypto
|
||||
)
|
||||
@@ -62,7 +61,6 @@ target_link_libraries(ot-ncp-mtd
|
||||
openthread-ncp-mtd
|
||||
${OT_PLATFORM_LIB}
|
||||
openthread-mtd
|
||||
openthread-platform-utils
|
||||
${OT_PLATFORM_LIB}
|
||||
mbedcrypto
|
||||
)
|
||||
@@ -71,6 +69,5 @@ target_link_libraries(ot-rcp
|
||||
openthread-rcp
|
||||
${OT_PLATFORM_LIB}
|
||||
openthread-radio
|
||||
openthread-platform-utils
|
||||
${OT_PLATFORM_LIB}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user