cmake_minimum_required(VERSION 3.13)

# Tell CMake where the pico-sdk is (relative to this file)
set(PICO_SDK_PATH "${CMAKE_CURRENT_LIST_DIR}/../pico-sdk")

# Import the Pico SDK *before* calling project()
include(${PICO_SDK_PATH}/external/pico_sdk_import.cmake)

# Now declare the project; the SDK toolchain is active
project(traffic C CXX ASM)

# Initialize the SDK
pico_sdk_init()

# Our executable: C file + assembly file
add_executable(traffic
    main.c
    traffic_light.S
)

# Link with standard library and GPIO support
target_link_libraries(traffic
    pico_stdlib
    hardware_gpio
)

# Enable USB stdio, disable UART (change if desired)
pico_enable_stdio_usb(traffic 1)
pico_enable_stdio_uart(traffic 0)

# Generate UF2, bin, etc.
pico_add_extra_outputs(traffic)
