This fixes a build error that was happening after #247 for targets that did not have any wifi drivers when you linked mbed-netsocket. The issue is that if you pass a non-existant library to a target_link_libraries() call, CMake thinks it's a system library and tries to link it with -l (legacy behavior), causing a linker error rather than a CMake error as it should. Thanks to @JojoS62 for diagnosing the issue!
Impact of changes
mbed-netsocket should be usable again... oops
Migration actions required
Documentation
None
Pull request type
[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)
Test results
[X] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR
Ideally this should be covered by one of the new CI builds once they're added...
Summary of changes
This fixes a build error that was happening after #247 for targets that did not have any wifi drivers when you linked mbed-netsocket. The issue is that if you pass a non-existant library to a target_link_libraries() call, CMake thinks it's a system library and tries to link it with -l (legacy behavior), causing a linker error rather than a CMake error as it should. Thanks to @JojoS62 for diagnosing the issue!
Impact of changes
mbed-netsocket should be usable again... oops
Migration actions required
Documentation
None
Pull request type
Test results
Ideally this should be covered by one of the new CI builds once they're added...
Reviewers