71 lines
2.0 KiB
CMake
71 lines
2.0 KiB
CMake
# Build each example as a standalone executable to verify compilation.
|
|
# Invoked via: make dist-tests (from lib/cs-midi/)
|
|
|
|
set(EXAMPLE_SOURCES
|
|
# Output elements
|
|
output/note_button.cpp
|
|
output/cc_button.cpp
|
|
output/pc_button.cpp
|
|
output/note_chord_button.cpp
|
|
output/note_button_latched.cpp
|
|
output/note_button_latching.cpp
|
|
output/note_buttons.cpp
|
|
output/note_button_matrix.cpp
|
|
output/cc_button_latched.cpp
|
|
output/cc_button_latching.cpp
|
|
output/cc_buttons.cpp
|
|
output/cc_button_matrix.cpp
|
|
output/cc_potentiometer.cpp
|
|
output/pb_potentiometer.cpp
|
|
output/cc_rotary_encoder.cpp
|
|
output/cc_absolute_encoder.cpp
|
|
output/pb_absolute_encoder.cpp
|
|
output/cc_increment_decrement_buttons.cpp
|
|
output/program_changer.cpp
|
|
output/cc_potentiometers.cpp
|
|
output/borrowed_cc_rotary_encoder.cpp
|
|
|
|
# Input elements
|
|
input/note_led.cpp
|
|
input/note_range_leds.cpp
|
|
input/cc_value.cpp
|
|
input/pb_value.cpp
|
|
input/note_value.cpp
|
|
input/kp_value.cpp
|
|
input/cc_led.cpp
|
|
input/note_range.cpp
|
|
input/cc_range.cpp
|
|
|
|
# Interfaces
|
|
interfaces/ble_midi.cpp
|
|
interfaces/midi_pipes.cpp
|
|
|
|
# Banks
|
|
banks/bank_cc_values.cpp
|
|
banks/transposer.cpp
|
|
banks/encoder_selector.cpp
|
|
banks/many_buttons_selector.cpp
|
|
banks/switch_selector.cpp
|
|
banks/program_change_selector.cpp
|
|
banks/bankable_note_led.cpp
|
|
)
|
|
|
|
foreach(src ${EXAMPLE_SOURCES})
|
|
get_filename_component(name ${src} NAME_WE)
|
|
set(target "example_${name}")
|
|
add_executable(${target} ${src})
|
|
target_include_directories(${target} PRIVATE ${CMAKE_SOURCE_DIR})
|
|
target_link_libraries(${target}
|
|
pico_stdlib
|
|
pico_cyw43_arch_lwip_threadsafe_background
|
|
pico_btstack_ble
|
|
pico_btstack_cyw43
|
|
hardware_adc
|
|
cs_midi
|
|
)
|
|
set_target_properties(${target} PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
|
list(APPEND EXAMPLE_TARGETS ${target})
|
|
endforeach()
|
|
|
|
add_custom_target(examples DEPENDS ${EXAMPLE_TARGETS})
|