-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
33 lines (23 loc) · 892 Bytes
/
CMakeLists.txt
File metadata and controls
33 lines (23 loc) · 892 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
31
32
33
# Set minimum required version of CMake
cmake_minimum_required(VERSION 3.12)
# Include build fuctions from Pico SDK
include ($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake)
# Set name of project (as PROJECT_NAME) and C/C++ standards
project(PICO_USB2PED C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
# Creates a pico-sdk subdirectory in our project for the libraries
pico_sdk_init()
# Previous commands added manually.
add_executable(${PROJECT_NAME}
main.cpp
)
# create map/bin/hex file etc.
pico_add_extra_outputs(${PROJECT_NAME})
# pull in common dependencies
target_link_libraries(${PROJECT_NAME} pico_stdlib)
# Enable usb output, disable uart output
pico_enable_stdio_usb(${PROJECT_NAME} 1)
pico_enable_stdio_uart(${PROJECT_NAME} 0)
# add url via pico_set_program_url
# example_auto_set_url(${PROJECT_NAME})