pick up new version of pico_sdk_import.cmake - only really relevant to optimize git download of pico-sdk

This commit is contained in:
graham sanderson 2022-05-17 16:16:00 -05:00
parent 2cb4d4aa1a
commit 6a747b3b71

View File

@ -29,11 +29,22 @@ if (NOT PICO_SDK_PATH)
if (PICO_SDK_FETCH_FROM_GIT_PATH) if (PICO_SDK_FETCH_FROM_GIT_PATH)
get_filename_component(FETCHCONTENT_BASE_DIR "${PICO_SDK_FETCH_FROM_GIT_PATH}" REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}") get_filename_component(FETCHCONTENT_BASE_DIR "${PICO_SDK_FETCH_FROM_GIT_PATH}" REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}")
endif () endif ()
FetchContent_Declare( # GIT_SUBMODULES_RECURSE was added in 3.17
pico_sdk if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.17.0")
GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk FetchContent_Declare(
GIT_TAG master pico_sdk
) GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk
GIT_TAG master
GIT_SUBMODULES_RECURSE FALSE
)
else ()
FetchContent_Declare(
pico_sdk
GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk
GIT_TAG master
)
endif ()
if (NOT pico_sdk) if (NOT pico_sdk)
message("Downloading Raspberry Pi Pico SDK") message("Downloading Raspberry Pi Pico SDK")
FetchContent_Populate(pico_sdk) FetchContent_Populate(pico_sdk)