-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
30 lines (21 loc) · 808 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
30 lines (21 loc) · 808 Bytes
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
cmake_minimum_required(VERSION 3.13)
set(PROJECT chipicopwn)
# initialize the SDK based on PICO_SDK_PATH
# note: this must happen before project()
include(pico_sdk_import.cmake)
project(${PROJECT})
# initialize the Raspberry Pi Pico SDK
pico_sdk_init()
add_executable(${PROJECT})
target_sources(${PROJECT} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/src/main.c
${CMAKE_CURRENT_SOURCE_DIR}/src/msc_disk.c
${CMAKE_CURRENT_SOURCE_DIR}/src/usb_descriptors.c
)
target_include_directories(${PROJECT} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/src
)
# Add pico_stdlib library which aggregates commonly used features
target_link_libraries(${PROJECT} pico_stdlib tinyusb_device tinyusb_board)
# create map/bin/hex/uf2 file in addition to ELF.
pico_add_extra_outputs(${PROJECT})