pico_generate_pio_header: Create OUTPUT_DIR (#1610)

Previously, if a custom OUTPUT_DIR was specified but didn't exist
then this command would fail.

Fixes: https://github.com/raspberrypi/pico-sdk/issues/1609
This commit is contained in:
timg236 2024-01-19 14:57:16 +00:00 committed by GitHub
parent f1c6fc8b6d
commit c9cce7a312
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,6 +26,7 @@ function(pico_generate_pio_header TARGET PIO)
endif()
if (pico_generate_pio_header_OUTPUT_DIR)
file(MAKE_DIRECTORY ${pico_generate_pio_header_OUTPUT_DIR})
get_filename_component(HEADER_DIR ${pico_generate_pio_header_OUTPUT_DIR} ABSOLUTE)
else()
set(HEADER_DIR "${CMAKE_CURRENT_BINARY_DIR}")