-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
42 lines (33 loc) · 935 Bytes
/
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
# What CMake to start at
cmake_minimum_required(VERSION 3.12)
set(PRJ_NAME "pico-synth")
set(PICO_CXX_ENABLE_EXCEPTIONS "1")
# Include the subsidiary .cmake file to get the SDK
include(pico_sdk_import.cmake)
# Initalise the SDK
pico_sdk_init()
# Set the name and version of the project
project(${PRJ_NAME} VERSION 0.1.0)
include_directories(${PRJ_NAME}
include
${CMAKE_CURRENT_SOURCE_DIR}/external/stk/include
)
# Link the Project to a source file (step 4.6)
add_executable(${PRJ_NAME}
src/main.cpp
src/midi.cpp
src/audio.cpp
external/stk/src/SineWave.cpp
external/stk/src/Stk.cpp
)
# Link the Project to an extra library (pico_stdlib)
target_link_libraries(${PRJ_NAME}
pico_stdlib
hardware_pwm
)
# target_compile_definitions(${PRJ_NAME} PRIVATE
# PICO_DEFAULT_UART_TX_PIN=0
# PICO_DEFAULT_UART_RX_PIN=1
# )
# Create map/bin/hex file etc.)
pico_add_extra_outputs(${PRJ_NAME})