-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
39 lines (30 loc) · 1.05 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
cmake_minimum_required(VERSION 3.12)
# Change your executable name to something creative!
set(NAME BlinkLEDExt) # <-- Name your project/executable here!
include(pico_sdk_import.cmake)
# Gooey boilerplate
project(${NAME} C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
# Initialize the SDK
pico_sdk_init()
#include Libraries
SET(FREERTOS_CONFIG_FILE_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/port/FreeRTOS-Kernel" CACHE STRING "Local Config")
include_directories("${FREERTOS_CONFIG_FILE_DIRECTORY}")
include(FreeRTOS_Kernel_import.cmake)
add_compile_definitions(
FREE_RTOS_KERNEL_SMP=1
portSUPPORT_SMP=1
)
#Add main source directory
add_subdirectory(src)
#Set up files for the release packages
install(CODE "execute_process(COMMAND $ENV{HOME}/bin/picoDeploy.sh ${CMAKE_CURRENT_BINARY_DIR}/src/${NAME}.elf)")
# Set up files for the release packages
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/src/${NAME}.uf2
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
)
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
set(CPACK_GENERATOR "ZIP" "TGZ")
include(CPack)