Add printout of picotool location (#2475)

This prints out the location of the picotool executable being used

For example:
* `Using picotool from /usr/local/bin/picotool` for a system install
* `Using picotool from /home/name/pico-examples/build/_deps/picotool/picotool` for a picotool fetched by the SDK
This commit is contained in:
will-v-pi 2025-05-20 21:29:41 +01:00 committed by GitHub
parent 550aa09624
commit 14d75c0b78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -139,6 +139,14 @@ function(pico_init_picotool)
endif()
endif()
if (TARGET picotool AND NOT DEFINED ENV{_PICOTOOL_FOUND_THIS_RUN})
# Internal environment variable to prevent printing multiple times
set(ENV{_PICOTOOL_FOUND_THIS_RUN} 1)
get_property(picotool_location TARGET picotool PROPERTY LOCATION)
message("Using picotool from ${picotool_location}")
endif()
if (TARGET picotool)
set(picotool_FOUND 1 PARENT_SCOPE)
else()