Moving lvgl sources out of project

Hi! I’m fairly new to lvgl (and c) and I was wondering if there is any specific reason why the lvgl and lv_drivers sources had to be inside the project? In other words, is there a technical reason why I can’t just move them to /usr/local/include and add the include path to my compile flags? Or would that break something internally?

Thank you!

We mostly do it this way to make it easier to explain to newer programmers, and also easier to work with regardless of the build system/IDE in use. If you wanted to move them to /usr/local/include, that would work, but keep in mind that you would still need to compile the C files.

(Also, unlike many C projects, our includes and sources are in the same folder.)

keep in mind that you would still need to compile the C files

Fair. I assume this means I also need to add -l/usr/local/include/lvgl and -l/usr/local/include/lv_drivers so that my builds can link against those compiled C files?

Thanks for the help!

Not quite. -l is used to link to libraries (that is, .a files). You probably want to compile these C files directly using a Makefile, etc. into .o files, and then link those as you would for your normal project files.