This is what i typically do, for STM32 (generic ARM Cortex Projects)
It’s pretty much what is described in Use LVGL in an STM32 HAL Project - LVGL 9.6 documentation and Overview - LVGL 9.6 documentation
With CMAKE is a bit different, but similar, with specifics related to cMake…
This “recipe” works for me, the second “include” directory in the settings most likely isn’t necessary as long we use `#include “lvgl/lvgl.h” in the C Code…
The folder location can be wherever you prefer to have it, it it’s a STM32 CubeMx Project, probably inside “Middlewares” or eventually “Drivers”, or a root folder called “lvgl”… user choice as long the include paths are then “correct”, especially the ones required for lvgl to find lv_conf.h. Overview - LVGL 9.6 documentation
When using Eclipse on Windows (Not sure if this applies to STM32CubeIDE) is necessary to adjust some stuff because of “too long path on the linker stage, due to high number of c files in LVGL”.