-
Notifications
You must be signed in to change notification settings - Fork 7
/
CMakeLists.txt
48 lines (40 loc) · 1.62 KB
/
CMakeLists.txt
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
cmake_minimum_required(VERSION 3.13)
include(pico_sdk_import.cmake)
project(pico-superkey-board_project C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
pico_sdk_init()
add_executable(pico-superkey-board
pico-superkey-board.cpp
TinyUSB_Mouse_and_Keyboard/TinyUSB_Mouse_and_Keyboard.cpp
Adafruit_TinyUSB_Arduino/src/arduino/hid/Adafruit_USBD_HID.cpp
Adafruit_TinyUSB_Arduino/src/arduino/Adafruit_USBD_Device.cpp
Adafruit_TinyUSB_Arduino/src/arduino/ports/rp2040/Adafruit_TinyUSB_rp2040.cpp
Print.cpp
)
target_include_directories(pico-superkey-board PRIVATE ${CMAKE_CURRENT_LIST_DIR})
target_link_libraries(pico-superkey-board
pico_stdlib
pico_unique_id
tinyusb_device
tinyusb_board
)
pico_add_extra_outputs(pico-superkey-board)
add_definitions(-DUSE_TINYUSB)
add_definitions(-DUSB_PRODUCT="Pico Keyboard")
add_definitions(-DARDUINO_ARCH_RP2040)
add_definitions(-DCFG_TUSB_CONFIG_FILE="includes/tusb_config.h")
include_directories(includes
TinyUSB_Mouse_and_Keyboard
Adafruit_TinyUSB_Arduino/src
)
# remove Adafruit tinyusb library code so that only the pico-sdk tinyusb code is used
# to restore, cd Adafruit_TinyUSB_Arduino/ && git checkout HEAD .
file(REMOVE Adafruit_TinyUSB_Arduino/src/tusb.c)
file(REMOVE Adafruit_TinyUSB_Arduino/src/tusb.h)
file(REMOVE Adafruit_TinyUSB_Arduino/src/tusb_option.h)
file(REMOVE_RECURSE Adafruit_TinyUSB_Arduino/src/osal/)
file(REMOVE_RECURSE Adafruit_TinyUSB_Arduino/src/portable/)
file(REMOVE_RECURSE Adafruit_TinyUSB_Arduino/src/device/)
file(REMOVE_RECURSE Adafruit_TinyUSB_Arduino/src/common/)
file(REMOVE_RECURSE Adafruit_TinyUSB_Arduino/src/class/)