examples: Check target is defined before linking
We overloaded IOTSDK_* fetch options as configuration options for
conditionally linking to targets providing the linker and startup files
for AN547 MPS3 or other targets. We can just check if the targets exist
before linking to them. This means we don't need to check our fetch
options in as many places in examples.
This provides users with a better example of how to conditionally link
to targets in CMake. If a complex project already happened to have these
targets available in the build system, the more specific (and standard)
conditional check would still work. This is preferable to advising users
to set some special SDK options.
Signed-off-by:
Robert Walton <rob.walton@arm.com>
Loading
Please register or sign in to comment