-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
45 lines (36 loc) · 1.52 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
cmake_minimum_required(VERSION 3.12)
# PICO_SDK_PATH env var must point to the sdk installation path
include($ENV{PICO_SDK_PATH}/pico_sdk_init.cmake)
project(pico-pedal LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
find_package(guitar_fx_lib CONFIG REQUIRED)
pico_sdk_init()
add_executable(${PROJECT_NAME})
target_sources(${PROJECT_NAME} PRIVATE src/pico_pedal_main.cpp
src/adc.cpp
src/audio_pwm.cpp
src/button.cpp
src/display.cpp
src/potentiometer.cpp
src/led.cpp
src/switch.cpp
src/ssd1306/GFX.cpp
src/ssd1306/SSD1306.cpp
)
target_include_directories(${PROJECT_NAME} PRIVATE include)
target_link_libraries(${PROJECT_NAME}
pico_stdlib
pico_multicore
hardware_adc
hardware_i2c
hardware_pwm
hardware_spi
guitar_fx_lib::guitar_fx_lib
)
# Enable USB serial output and disable UARTS
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})