Telecommande_2026-2027/CMakeLists.txt

41 lines
853 B
CMake
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

cmake_minimum_required(VERSION 3.13)
# Explicitely define board.
set(PICO_BOARD pico_w)
if(NOT DEFINED PICO_BOARD)
add_definitions(-DPICO_BOARD=${PICO_BOARD})
endif()
# Need to include pico-sdk cmake support. Must happen before project.
include($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake)
project(Controller C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
pico_sdk_init()
add_executable(Controller
src/main.c
)
add_subdirectory(lib/PicoW_WiFi_Operator)
add_subdirectory(lib/PicoW_UDP)
target_link_libraries(Controller
pico_stdlib
PicoW_WiFi_Operator
PicoW_UDP
)
# Stdio configuration
pico_enable_stdio_usb(Controller 1)
pico_enable_stdio_uart(Controller 1)
pico_add_extra_outputs(Controller)
add_custom_target(Flash
DEPENDS Controller
COMMAND picotool load -f ${PROJECT_BINARY_DIR}/Controller.uf2
)