Mercurial > ~darius > hgwebdir.cgi > modulator
comparison pico_sdk_import.cmake @ 5:2db42eaba3c8
WIP
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Sat, 15 Feb 2025 22:57:18 +1030 |
parents | a55e39064a71 |
children |
comparison
equal
deleted
inserted
replaced
4:b6416c4aadc8 | 5:2db42eaba3c8 |
---|---|
27 include(FetchContent) | 27 include(FetchContent) |
28 set(FETCHCONTENT_BASE_DIR_SAVE ${FETCHCONTENT_BASE_DIR}) | 28 set(FETCHCONTENT_BASE_DIR_SAVE ${FETCHCONTENT_BASE_DIR}) |
29 if (PICO_SDK_FETCH_FROM_GIT_PATH) | 29 if (PICO_SDK_FETCH_FROM_GIT_PATH) |
30 get_filename_component(FETCHCONTENT_BASE_DIR "${PICO_SDK_FETCH_FROM_GIT_PATH}" REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}") | 30 get_filename_component(FETCHCONTENT_BASE_DIR "${PICO_SDK_FETCH_FROM_GIT_PATH}" REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}") |
31 endif () | 31 endif () |
32 FetchContent_Declare( | 32 # GIT_SUBMODULES_RECURSE was added in 3.17 |
33 pico_sdk | 33 if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.17.0") |
34 GIT_REPOSITORY https://github.com/raspberrypi/pico-sdk | 34 FetchContent_Declare( |
35 GIT_TAG master | 35 pico_sdk |
36 ) | 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 if (NOT pico_sdk) | 48 if (NOT pico_sdk) |
38 message("Downloading Raspberry Pi Pico SDK") | 49 message("Downloading Raspberry Pi Pico SDK") |
39 FetchContent_Populate(pico_sdk) | 50 FetchContent_Populate(pico_sdk) |
40 set(PICO_SDK_PATH ${pico_sdk_SOURCE_DIR}) | 51 set(PICO_SDK_PATH ${pico_sdk_SOURCE_DIR}) |
41 endif () | 52 endif () |