forked from gfoot/picoprom
-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
40 lines (30 loc) · 890 Bytes
/
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
cmake_minimum_required(VERSION 3.13)
set(PICO_SDK_FETCH_FROM_GIT on)
include(pico_sdk_import.cmake)
set(NAME picoprom)
set(URL "https://github.com/dcooperdalrymple/picoprom")
project(${NAME} C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
pico_sdk_init()
add_executable(${NAME}
${CMAKE_CURRENT_LIST_DIR}/src/config.cpp
${CMAKE_CURRENT_LIST_DIR}/src/rom.cpp
${CMAKE_CURRENT_LIST_DIR}/src/storage.cpp
${CMAKE_CURRENT_LIST_DIR}/src/picoprom.cpp
)
target_include_directories(${NAME} PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/lib/pico-xmodem)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/lib) # littlefs
target_link_libraries(${NAME}
pico_stdio
pico_stdlib
pico_rand
pico_xmodem
hardware_flash
hardware_sync
littlefs
)
pico_enable_stdio_usb(${NAME} 1)
pico_enable_stdio_uart(${NAME} 0)
pico_add_extra_outputs(${NAME})