-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
54 lines (46 loc) · 1.17 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
46
47
48
49
50
51
52
53
54
cmake_minimum_required(VERSION 3.13)
set(NAME pico-guitar-midi-tracker)
set(URL "https://github.com/dcooperdalrymple/pico-guitar-midi-tracker")
# initialize pico-sdk from GIT
# (note this can come from environment, CMake cache etc)
set(PICO_SDK_FETCH_FROM_GIT on)
# pico_sdk_import.cmake is a single file copied from this SDK
# note: this must happen before project()
include(pico_sdk_import.cmake)
# initialize the Raspberry Pi Pico SDK
pico_sdk_init()
# rest of your project
project(${NAME} C CXX ASM)
# Main Program
add_executable(${NAME}
src/midi.cpp
src/tracker.cpp
src/main.cpp
)
target_link_libraries(${NAME}
pico_stdlib
pico_float
hardware_gpio
hardware_pwm
hardware_irq
hardware_adc
hardware_clocks
hardware_dma
pico_multicore
)
pico_enable_stdio_usb(${NAME} 1)
pico_enable_stdio_uart(${NAME} 0)
pico_add_extra_outputs(${NAME})
# MIDI Test
add_executable(${NAME}_midi
src/midi.cpp
src/tests/midi.cpp
)
target_link_libraries(${NAME}_midi
pico_stdlib
hardware_gpio
)
pico_enable_stdio_usb(${NAME}_midi 1)
pico_enable_stdio_uart(${NAME}_midi 0)
pico_add_extra_outputs(${NAME}_midi)
pico_set_program_url(${NAME} ${URL})