File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed
Expand file tree Collapse file tree 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)
2929 if (PICO_SDK_FETCH_FROM_GIT_PATH)
3030 get_filename_component (FETCHCONTENT_BASE_DIR "${PICO_SDK_FETCH_FROM_GIT_PATH} " REALPATH BASE_DIR "${CMAKE_SOURCE_DIR} " )
3131 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+
3748 if (NOT pico_sdk)
3849 message ("Downloading Raspberry Pi Pico SDK" )
3950 FetchContent_Populate(pico_sdk)
You can’t perform that action at this time.
0 commit comments