# == DO NEVER EDIT THE NEXT LINES for Raspberry Pi Pico VS Code Extension to work == if(WIN32) set(USERHOME $ENV{USERPROFILE}) else() set(USERHOME $ENV{HOME}) endif() set(PICO_SDK_PATH ${USERHOME}/.pico-sdk/sdk/1.5.1) set(PICO_TOOLCHAIN_PATH ${USERHOME}/.pico-sdk/toolchain/13_2_Rel1) if(WIN32) set(pico-sdk-tools_DIR ${USERHOME}/.pico-sdk/tools/1.5.1) include(${pico-sdk-tools_DIR}/pico-sdk-tools-config.cmake) include(${pico-sdk-tools_DIR}/pico-sdk-tools-config-version.cmake) endif() # ==================================================================================== cmake_minimum_required(VERSION 3.13) # initialize the SDK based on PICO_SDK_PATH # note: this must happen before project() include(pico_sdk_import.cmake) project(dp) # initialize the Raspberry Pi Pico SDK pico_sdk_init() file(GLOB SOURCES "src/*.c") add_executable(dp ${SOURCES}) target_include_directories(dp PRIVATE "${PROJECT_SOURCE_DIR}/include") pico_generate_pio_header(pio_st7789_lcd ${CMAKE_CURRENT_LIST_DIR}/st7789_lcd.pio) # Add pico_stdlib library which aggregates commonly used features target_link_libraries(dp pico_stdlib hardware_pio hardware_interp) # create map/bin/hex/uf2 file in addition to ELF. pico_add_extra_outputs(dp)