diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3a62026..16e330d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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