File tree 1 file changed +16
-5
lines changed
1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -29,11 +29,22 @@ if (NOT PICO_SDK_PATH)
29
29
if (PICO_SDK_FETCH_FROM_GIT_PATH)
30
30
get_filename_component (FETCHCONTENT_BASE_DIR "${PICO_SDK_FETCH_FROM_GIT_PATH} " REALPATH BASE_DIR "${CMAKE_SOURCE_DIR} " )
31
31
endif ()
32
- FetchContent_Declare(
33
- pico_sdk
34
- GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk
35
- GIT_TAG master
36
- )
32
+ # GIT_SUBMODULES_RECURSE was added in 3.17
33
+ if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.17.0" )
34
+ FetchContent_Declare(
35
+ pico_sdk
36
+ GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk
37
+ GIT_TAG master
38
+ GIT_SUBMODULES_RECURSE FALSE
39
+ )
40
+ else ()
41
+ FetchContent_Declare(
42
+ pico_sdk
43
+ GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk
44
+ GIT_TAG master
45
+ )
46
+ endif ()
47
+
37
48
if (NOT pico_sdk)
38
49
message ("Downloading Raspberry Pi Pico SDK" )
39
50
FetchContent_Populate(pico_sdk)
You can’t perform that action at this time.
0 commit comments