From 6c123706591b1d6d5f5ef84e43acfe91ef29b61b Mon Sep 17 00:00:00 2001 From: Aleksa Vuckovic Date: Thu, 9 Feb 2023 00:25:10 +0100 Subject: Initial commit --- CMakeLists.txt | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 CMakeLists.txt (limited to 'CMakeLists.txt') 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() -- cgit v1.2.3