Put lv_conf.h inside my arduino Sketch Folder

Description

I use LVGL 8.4 and Squareline Studio 1.50 and Arduino IDE 2.3.4

What MCU/Processor/Board and compiler are you using?

ESP32S3

What LVGL version are you using?

8.4

What do you want to achieve?

Place lv_conf.h into sketch folder to include it into git and have different settings for different projects

What have you tried so far?

Move and include - and searching a lot…

Code to reproduce

Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.

The code block(s) should be formatted like:

#include <lvgl.h>
#include "src/ui/ui.h"
#include "src/ui/ui_helpers.h"

My project is not small and works fine when the lv_conf.h is beside the libraries folder…

Have you tried as below?

#define LV_CONF_INCLUDE_SIMPLE
#include "lv_conf.h" // <-- path to your lv_conf.h

#include <lvgl.h>
#include "src/ui/ui.h"
#include "src/ui/ui_helpers.h"

Yes. I tryed a lot…

C:\Users\xx\Documents\Arduino\sketch\sketch.ino:40:10: fatal error: lvgl.h: No such file or directory

Even when i change the path of the lvgl.h it never works for me…

Try below;
In your sketch, add a new tab ‘build_opt.h’ and add the line below
-DLV_CONF_INCLUDE_SIMPLE

.ino file

#include "lv_conf.h"
#include <lvgl.h>

sorry for the late reply.

The first hint was already the solution. But it only works if the IDE is closed and restarted once after the change. Then the cache is probably rebuilt… I had the problem that I could not make any changes to the includes at all… Thanks for the hints.