-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
65 lines (51 loc) · 1.51 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
55
56
57
58
59
60
61
62
63
64
65
cmake_minimum_required(VERSION 3.12)
set(NAME blunicorn)
include(pico_sdk_import.cmake)
include(pico_extras_import.cmake)
project(${NAME} C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
pico_sdk_init()
include(bluetooth/bluetooth.cmake)
include(effect/rainbow_fft.cmake)
include(effect/classic_fft.cmake)
if(DISPLAY_PATH AND EXISTS ${CMAKE_CURRENT_LIST_DIR}/${DISPLAY_PATH})
include(${CMAKE_CURRENT_LIST_DIR}/${DISPLAY_PATH})
else()
message(WARNING "Using default display (display/galactic/galactic_unicorn.cmake)...")
include(display/galactic/galactic_unicorn.cmake)
endif()
add_executable(${NAME}
${CMAKE_CURRENT_LIST_DIR}/src/main.cpp
${CMAKE_CURRENT_LIST_DIR}/src/a2dp_sink.cpp
${CMAKE_CURRENT_LIST_DIR}/src/btstack_audio_pico.cpp
)
target_include_directories(${NAME} PRIVATE
${CMAKE_CURRENT_LIST_DIR}
${CMAKE_CURRENT_LIST_DIR}/effect
)
target_link_libraries(${NAME}
picow_bt_example_common
pico_audio_i2s
pico_multicore
display
rainbow_fft
classic_fft
)
message(WARNING "Display: ${DISPLAY_NAME}")
target_compile_definitions(${NAME} PRIVATE
PICO_AUDIO_I2S_DATA_PIN=9
PICO_AUDIO_I2S_CLOCK_PIN_BASE=10
BLUETOOTH_DEVICE_NAME="${DISPLAY_NAME}"
)
pico_enable_stdio_usb(${NAME} 1)
pico_add_extra_outputs(${NAME})
# Set up files for the release packages
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/${NAME}.uf2
${CMAKE_CURRENT_LIST_DIR}/README.md
DESTINATION .
)
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
set(CPACK_GENERATOR "ZIP" "TGZ")
include(CPack)