pico-bt-display/CMakeLists.txt

36 lines
1.2 KiB
Text
Raw Permalink Normal View History

2024-05-13 19:20:39 +02:00
# == 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()
# ====================================================================================
2024-05-13 16:29:38 +02:00
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)
set(CMAKE_CXX_FLAGS "-O3 -Wall -Wextra")
2024-05-13 16:29:38 +02:00
# initialize the Raspberry Pi Pico SDK
pico_sdk_init()
2024-05-13 19:20:39 +02:00
file(GLOB SOURCES "src/*.c")
add_executable(dp ${SOURCES})
pico_generate_pio_header(dp "${PROJECT_SOURCE_DIR}/src/st7789_lcd.pio")
2024-05-13 19:20:39 +02:00
target_include_directories(dp PRIVATE "${PROJECT_SOURCE_DIR}/include")
2024-05-13 16:29:38 +02:00
# Add pico_stdlib library which aggregates commonly used features
2024-05-13 19:20:39 +02:00
target_link_libraries(dp pico_stdlib hardware_pio hardware_interp)
2024-05-13 16:29:38 +02:00
# create map/bin/hex/uf2 file in addition to ELF.
pico_add_extra_outputs(dp)