cmake_minimum_required(VERSION 3.13) # initialize pico-sdk from submodule # note: this must happen before project() include(pico-sdk/pico_sdk_init.cmake) project(rp2040_hid) # initialize the Raspberry Pi Pico SDK pico_sdk_init() add_executable(rp2040_app src/buttons.c src/app_main.c src/rotary.c src/sevenseg.c src/statusleds.c src/usb_config.c ) pico_generate_pio_header(rp2040_app ${CMAKE_CURRENT_LIST_DIR}/src/sevenseg.pio) pico_generate_pio_header(rp2040_app ${CMAKE_CURRENT_LIST_DIR}/src/shift_in.pio) pico_generate_pio_header(rp2040_app ${CMAKE_CURRENT_LIST_DIR}/src/statusleds.pio) target_link_libraries(rp2040_app pico_stdlib pico_unique_id tinyusb_device tinyusb_board hardware_pio) target_include_directories(rp2040_app PRIVATE src) # create map/bin/hex/uf2 file in addition to ELF. pico_add_extra_outputs(rp2040_app) add_executable(ledtest src/buttons.c src/ledtest.c src/sevenseg.c src/statusleds.c src/rotary.c ) pico_generate_pio_header(ledtest ${CMAKE_CURRENT_LIST_DIR}/src/sevenseg.pio) pico_generate_pio_header(ledtest ${CMAKE_CURRENT_LIST_DIR}/src/shift_in.pio) pico_generate_pio_header(ledtest ${CMAKE_CURRENT_LIST_DIR}/src/statusleds.pio) target_link_libraries(ledtest pico_stdlib hardware_pio) pico_add_extra_outputs(ledtest) add_executable(lcdtest src/lcdtest.c src/lcdbus.c src/lcd_ui.c src/ui_radio.c src/touch.c ) pico_generate_pio_header(lcdtest ${CMAKE_CURRENT_LIST_DIR}/src/lcdbus.pio) target_link_libraries(lcdtest pico_stdlib hardware_pio hardware_spi) pico_add_extra_outputs(lcdtest)