Configure external libraries

Hello,

just a short question. I just started my first project in platformio/esp idf and included the external library lvgl.
Lvgl requires a configuration file to be present at the same directory level where the library subdir itself is stored. However a compiler option can be used to leverage loading the config from a different location.

As i dont want to push contents of the directories created by the library manager to git the question is:

Can i forward a compiler option to the process of building an external library and specify the value somewhere in platformio.ini

Thank you for your help
and kind regards

Christian Poisel

Just use build_flags to add some directory to the include path where the lv_conf.h is and -D LV_CONF_INCLUDE_SIMPLE, to achieve what they talk about in their documentation.

LVGL + ESP-IDF has also been talked about in Espidf lvgl how to use it and the threads linked therein, which is where I got the above example from.

Thank you very much Max.

i moved all configs to the subdir libconf in the include directory of my project and adjusted the plaftformio.ini according to your description.

Now everything works exactly as expected.

1 Like