set stdio depending on debug/release

This commit is contained in:
Martin Brodbeck 2023-01-04 10:23:11 +01:00
parent 987c98ccbe
commit f510d07360

View file

@ -43,8 +43,13 @@ set_target_properties(${CMAKE_PROJECT_NAME}
pico_generate_pio_header(${CMAKE_PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}/ws2812.pio)
pico_enable_stdio_uart(${CMAKE_PROJECT_NAME} 1)
pico_enable_stdio_usb(${CMAKE_PROJECT_NAME} 0)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
pico_enable_stdio_uart(${CMAKE_PROJECT_NAME} 1)
pico_enable_stdio_usb(${CMAKE_PROJECT_NAME} 0)
else()
pico_enable_stdio_uart(${CMAKE_PROJECT_NAME} 0)
pico_enable_stdio_usb(${CMAKE_PROJECT_NAME} 1)
endif()
target_link_libraries(${CMAKE_PROJECT_NAME}
pico_stdlib