[cmake] fix build with external mbedTLS (#4696)

`mbedcrypto` target is only available when `OT_BUILTIN_MBEDTLS` is set,
therefore linking it unconditionally when external mbed TLS instance is
used results in a linking error.

Signed-off-by: Robert Lubos <[email protected]>
This commit is contained in:
Robert Lubos
2020-03-17 10:03:06 -07:00
committed by GitHub
parent bf1cf97b0f
commit 0c34c42043
+10 -8
View File
@@ -233,12 +233,14 @@ target_sources(openthread-radio PRIVATE
utils/parse_cmdline.cpp
)
target_link_libraries(openthread-ftd
PUBLIC
mbedcrypto
)
if(OT_BUILTIN_MBEDTLS)
target_link_libraries(openthread-ftd
PUBLIC
mbedcrypto
)
target_link_libraries(openthread-mtd
PUBLIC
mbedcrypto
)
target_link_libraries(openthread-mtd
PUBLIC
mbedcrypto
)
endif()