2023-04-10 11:51:45 +02:00
|
|
|
cmake_minimum_required(VERSION 3.13)
|
|
|
|
|
|
|
|
include(libs/pico-sdk/pico_sdk_init.cmake)
|
|
|
|
|
|
|
|
project(DonCon2040 VERSION 0.1.0)
|
|
|
|
|
|
|
|
pico_sdk_init()
|
|
|
|
|
|
|
|
set(CMAKE_C_STANDARD 11)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
|
|
|
|
add_compile_options(-Wall -Wextra -Werror)
|
|
|
|
|
|
|
|
add_subdirectory(libs)
|
|
|
|
|
2023-04-10 13:04:38 +02:00
|
|
|
file(GLOB ${PROJECT_NAME}_SOURCES src/*.cpp src/utils/*.cpp
|
|
|
|
src/peripherals/*.cpp)
|
2023-04-10 11:51:45 +02:00
|
|
|
|
|
|
|
add_executable(${PROJECT_NAME} ${${PROJECT_NAME}_SOURCES})
|
|
|
|
|
|
|
|
target_include_directories(${PROJECT_NAME}
|
|
|
|
PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include)
|
|
|
|
|
2023-04-22 17:16:33 +02:00
|
|
|
target_link_libraries(${PROJECT_NAME} PUBLIC pico_stdlib pico_multicore
|
|
|
|
pio_ws2812)
|
2023-04-10 11:51:45 +02:00
|
|
|
|
|
|
|
pico_enable_stdio_usb(${PROJECT_NAME} 1)
|
|
|
|
pico_enable_stdio_uart(${PROJECT_NAME} 0)
|
|
|
|
|
|
|
|
# create map/bin/hex/uf2 file in addition to ELF.
|
|
|
|
pico_add_extra_outputs(${PROJECT_NAME})
|