summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: 35a63ad7a3ce33b31928f0650853c1ef79451b0f (plain)
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
# CMAkeLists.txt - Main build script for sbc-harness
#
# Copyright (C) 2024  Luke T. Shumaker <lukeshu@lukeshu.com>
# SPDX-Licence-Identifier: AGPL-3.0-or-later

cmake_minimum_required(VERSION 3.13)

set(PICO_SDK_PATH "${CMAKE_SOURCE_DIR}/3rd-party/pico-sdk")
include(pico_sdk_import.cmake)

project(sbc_harness)

pico_sdk_init()

add_executable(sbc_harness)
target_sources(sbc_harness PUBLIC
  main.c
  coroutine.c
  usb_common.c
  usb_keyboard.c
)
target_include_directories(sbc_harness PUBLIC ${CMAKE_CURRENT_LIST_DIR}) # So TinyUSB can find tusb_config.h
target_link_libraries(sbc_harness
  pico_stdlib
  pico_unique_id
  tinyusb_device
  tinyusb_board
)
pico_enable_stdio_usb(sbc_harness 0)
pico_enable_stdio_uart(sbc_harness 1)
pico_enable_stdio_semihosting(sbc_harness 0)
pico_enable_stdio_rtt(sbc_harness 0)
pico_add_extra_outputs(sbc_harness) # create map/bin/hex/uf2 file in addition to ELF.
pico_set_program_url(sbc_harness "https://git.lukeshu.com/sbc-harness")