diff options
| author | Aleksa Vuckovic <aleksa@vuckovic.cc> | 2023-02-09 00:25:10 +0100 |
|---|---|---|
| committer | Aleksa Vuckovic <aleksa@vuckovic.cc> | 2023-02-09 00:25:48 +0100 |
| commit | 6c123706591b1d6d5f5ef84e43acfe91ef29b61b (patch) | |
| tree | 8f13bf6090d683be3ed51463f4be503dae1a3749 /CMakeLists.txt | |
Initial commit
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..c05c0c6 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.12) + +# Pull in Pico SDK (must be before project) +include(pico_sdk_import.cmake) + +project(led_cube C CXX ASM) +set(CMAKE_C_STANDARD 11) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +set(PICO_EXAMPLES_PATH $(PROJECT_SOURCE_DIR)) + +# Initalise the SDK +pico_sdk_init() + +if (TARGET tinyusb_device) + add_executable(led_cube + led_cube.c + ) + + # pull in common dependencies + target_link_libraries(led_cube + pico_stdlib + pico_multicore + ) + + # enable usb output, disable uart output + pico_enable_stdio_usb(led_cube 1) + pico_enable_stdio_uart(led_cube 0) + + # create map/bin/hex file etc. + pico_add_extra_outputs(led_cube) + + elseif(PICO_ON_DEVICE) + message(WARNING "not building hello_usb because TinyUSB submodule is not initialized in the SDK") +endif() |
