File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,20 @@ if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT_PATH} AND (NOT PICO_SDK_FETCH_FROM_GIT_P
1818 message ("Using PICO_SDK_FETCH_FROM_GIT_PATH from environment ('${PICO_SDK_FETCH_FROM_GIT_PATH} ')" )
1919endif ()
2020
21+ if (DEFINED ENV{PICO_SDK_FETCH_FROM_GIT_TAG} AND (NOT PICO_SDK_FETCH_FROM_GIT_TAG))
22+ set (PICO_SDK_FETCH_FROM_GIT_TAG $ENV{PICO_SDK_FETCH_FROM_GIT_TAG} )
23+ message ("Using PICO_SDK_FETCH_FROM_GIT_TAG from environment ('${PICO_SDK_FETCH_FROM_GIT_TAG} ')" )
24+ endif ()
25+
26+ if (PICO_SDK_FETCH_FROM_GIT AND NOT PICO_SDK_FETCH_FROM_GIT_TAG)
27+ set (PICO_SDK_FETCH_FROM_GIT_TAG "master" )
28+ message ("Using master as default value for PICO_SDK_FETCH_FROM_GIT_TAG" )
29+ endif ()
30+
2131set (PICO_SDK_PATH "${PICO_SDK_PATH} " CACHE PATH "Path to the Raspberry Pi Pico SDK" )
2232set (PICO_SDK_FETCH_FROM_GIT "${PICO_SDK_FETCH_FROM_GIT} " CACHE BOOL "Set to ON to fetch copy of SDK from git if not otherwise locatable" )
2333set (PICO_SDK_FETCH_FROM_GIT_PATH "${PICO_SDK_FETCH_FROM_GIT_PATH} " CACHE FILEPATH "location to download SDK" )
34+ set (PICO_SDK_FETCH_FROM_GIT_TAG "${PICO_SDK_FETCH_FROM_GIT_TAG} " CACHE FILEPATH "release tag for SDK" )
2435
2536if (NOT PICO_SDK_PATH)
2637 if (PICO_SDK_FETCH_FROM_GIT)
@@ -34,14 +45,14 @@ if (NOT PICO_SDK_PATH)
3445 FetchContent_Declare(
3546 pico_sdk
3647 GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk
37- GIT_TAG master
48+ GIT_TAG ${PICO_SDK_FETCH_FROM_GIT_TAG}
3849 GIT_SUBMODULES_RECURSE FALSE
3950 )
4051 else ()
4152 FetchContent_Declare(
4253 pico_sdk
4354 GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk
44- GIT_TAG master
55+ GIT_TAG ${PICO_SDK_FETCH_FROM_GIT_TAG}
4556 )
4657 endif ()
4758
You can’t perform that action at this time.
0 commit comments