-
Notifications
You must be signed in to change notification settings - Fork 452
Description
Environment
- Build System: CMake
- Operating System: Zephyr
- Operating System Version:
- Hosted Environment:
libcoap Configuration Summary
Problem Description
I am using libcoap for Zephyr with mbedtls. I have following problem during the build:
CMake Error at xxx/lib/libcoap/CMakeLists.txt:747 (target_link_libraries):
Target "coap-3" links to:
MbedTLS::mbedtls
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
I checked zephyr_modules.txt in build output and I see that libcoap is before mbedtls on the list. That means that libcoap does not see mbedtls at the momen when libcoap is build.
I have other sample application, where I don't see this issue. I checked zephyr_modules.txt there and I can see that mbedtls is before libcoap.
I have some fix that ensures that Zephyr sees mbedtls when building libcoap. In module.yml in libcoap we can add:
depends:
- mbedtls
But I guess that is not generic enough, because other users might not be using mbedtls. Do you have any suggestions?
Expected Behavior
Libcoap with mbedtls can be build for Zephyr and successful build is not dependent on modules order.
Actual Behavior
Build is dependent on modules order.