vibe-check/CMakeLists.txt
2023-04-25 16:36:13 +02:00

41 lines
898 B
CMake

cmake_minimum_required(VERSION 3.13)
set(PICO_SDK_PATH ${CMAKE_SOURCE_DIR}/lib/pico-sdk/)
include(${PICO_SDK_PATH}/external/pico_sdk_import.cmake)
project(vibe-check)
pico_sdk_init()
include_directories(
${CMAKE_SOURCE_DIR}/lib/rtt/RTT
${CMAKE_SOURCE_DIR}/src
)
add_executable(vibe-check
# BTStack seems to embed and link against RTT(!)
# lib/rtt/RTT/SEGGER_RTT.c
src/stdio_rtt.c
src/main.c
src/state.c
src/vibe_bt.c
src/buttons.c
)
target_link_libraries(vibe-check
pico_stdlib
pico_cyw43_arch_none
pico_btstack_ble
pico_btstack_cyw43
hardware_pwm
)
pico_btstack_make_gatt_header(vibe-check PRIVATE "${CMAKE_SOURCE_DIR}/src/vibe.gatt")
# enable debug logging to USB and UART
pico_enable_stdio_usb(vibe-check 1)
pico_enable_stdio_uart(vibe-check 1)
# create map/bin/hex/uf2 file in addition to ELF.
pico_add_extra_outputs(vibe-check)