LVGL in ESP-IDF projects must not be included as a library because its specific build and config options are not evaluated that way. It must be a component. See Espidf lvgl how to use it - #8 by maxgerhardt and Build error after adding lvgl component - #3 by maxgerhardt.