]> git.scottworley.com Git - tattlekey/blame_incremental - client/pico_sdk_import.cmake
client: Exponential backoff resend intervals
[tattlekey] / client / pico_sdk_import.cmake
... / ...
CommitLineData
1# This is a copy of <PICO_SDK_PATH>/external/pico_sdk_import.cmake
2
3# This can be dropped into an external project to help locate this SDK
4# It should be include()ed prior to project()
5
6if (DEFINED ENV{PICO_SDK_PATH} AND (NOT PICO_SDK_PATH))
7 set(PICO_SDK_PATH $ENV{PICO_SDK_PATH})
8 message("Using PICO_SDK_PATH from environment ('${PICO_SDK_PATH}')")
9endif ()
10
11set(PICO_SDK_PATH "${PICO_SDK_PATH}" CACHE PATH "Path to the Raspberry Pi Pico SDK")
12
13if (NOT PICO_SDK_PATH)
14 message(FATAL_ERROR "SDK location was not specified. Please set PICO_SDK_PATH.")
15endif ()
16
17get_filename_component(PICO_SDK_PATH "${PICO_SDK_PATH}" REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
18if (NOT EXISTS ${PICO_SDK_PATH})
19 message(FATAL_ERROR "Directory '${PICO_SDK_PATH}' not found")
20endif ()
21
22set(PICO_SDK_INIT_CMAKE_FILE ${PICO_SDK_PATH}/pico_sdk_init.cmake)
23if (NOT EXISTS ${PICO_SDK_INIT_CMAKE_FILE})
24 message(FATAL_ERROR "Directory '${PICO_SDK_PATH}' does not appear to contain the Raspberry Pi Pico SDK")
25endif ()
26
27set(PICO_SDK_PATH ${PICO_SDK_PATH} CACHE PATH "Path to the Raspberry Pi Pico SDK" FORCE)
28
29include(${PICO_SDK_INIT_CMAKE_FILE})