Skip to content

Commit

Permalink
pick up new version of pico_sdk_import.cmake - only really relevant t…
Browse files Browse the repository at this point in the history
…o optimize git download of pico-sdk
  • Loading branch information
kilograham committed May 17, 2022
1 parent f0ce80c commit eb6658e
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions pico_sdk_import.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,22 @@ if (NOT PICO_SDK_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}")
endif ()
FetchContent_Declare(
pico_sdk
GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk
GIT_TAG master
)
# GIT_SUBMODULES_RECURSE was added in 3.17
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.17.0")
FetchContent_Declare(
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)
message("Downloading Raspberry Pi Pico SDK")
FetchContent_Populate(pico_sdk)
Expand Down

0 comments on commit eb6658e

Please sign in to comment.