summaryrefslogtreecommitdiff
path: root/hid/pico/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'hid/pico/CMakeLists.txt')
-rw-r--r--hid/pico/CMakeLists.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/hid/pico/CMakeLists.txt b/hid/pico/CMakeLists.txt
new file mode 100644
index 00000000..bd771016
--- /dev/null
+++ b/hid/pico/CMakeLists.txt
@@ -0,0 +1,21 @@
+cmake_minimum_required(VERSION 3.13)
+
+set(PICO_SDK_PATH ${CMAKE_CURRENT_LIST_DIR}/.pico-sdk)
+set(PICO_TINYUSB_PATH ${CMAKE_CURRENT_LIST_DIR}/.tinyusb)
+
+# For TinyUSB
+set(FAMILY rp2040)
+
+# Include pico_sdk_import.cmake from pico-sdk (instead of copying)
+include(${PICO_SDK_PATH}/external/pico_sdk_import.cmake)
+
+# Generic setup
+set(PROJECT hid)
+project(${PROJECT})
+
+# Initialize Pico-SDK
+pico_sdk_init()
+
+# Set the path to the source code to build
+set(SRC_TO_BUILD_PATH ${CMAKE_CURRENT_LIST_DIR}/src)
+add_subdirectory(${SRC_TO_BUILD_PATH})