cmake_minimum_required(VERSION 3.16)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)

# Grow LVGL's invalidation buffer (default 32) so the ~80 moving rain labels of the
# busy face states stay as separate partial-redraw rects instead of collapsing into
# one full-screen redraw. Secondary mitigation for the DSI PSRAM-bandwidth underrun
# (primary fix is the reduced DPI clock in the BSP): a full-screen redraw dumps a
# ~1.3 MB PSRAM write burst that competes with the DSI's continuous framebuffer read
# and can re-trigger the underrun; keeping busy states partial avoids that. Applied
# globally so LVGL and esp_lvgl_adapter (both size inv_areas[] by LV_INV_BUF_SIZE)
# agree. The partial-flush path's stack scales with this, so app_main starts the LVGL
# task with a 16 KB stack (see desklock_main.c) — the 8 KB default overflows at 128.
# Must sit after the project.cmake include (defines idf_build_set_property) and before
# project() consumes it.
idf_build_set_property(COMPILE_OPTIONS "-DLV_INV_BUF_SIZE=128" APPEND)

project(desklock)
