diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 36281395a..bd4537d31 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -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()