pico-sdk
pico-sdk copied to clipboard
Implemented ARCHIVE_OUTPUT_DIRECTORY for uf2 output in CMake. Fixes #1012
This PR enables the use of the ARCHIVE_OUTPUT_DIRECTORY target properties in CMake for the generation of uf2 files in the pico_add_uf2_output
function.
The changeset in lines 47..51 is necessary due to CMake seemingly not automatically creating the ARCHIVE_OUTPUT_DIRECTORY if no archive target is present.
I felt the option ARCHIVE_OUTPUT_DIRECTORY is the more appropriate option as opposed to RUNTIME_OUTPUT_DIRECTORY.
If the target property is not set, previous behaviour is preserved.