summaryrefslogtreecommitdiff
path: root/hid/pico/CMakeLists.txt
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2023-08-03 05:47:27 +0300
committerMaxim Devaev <[email protected]>2023-08-03 05:47:27 +0300
commitc96057772c8d845c90ad7429e51689eeffb63d71 (patch)
treec376d9715169b9248aa8b7ef70b8a6506297f982 /hid/pico/CMakeLists.txt
parent1a8f98a64f9480c1062225e0fc994ceac4ba346d (diff)
rp2040 hid
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})