lvgl / lv_demos

Examples, tutorials and applications for the LVGL embedded GUI library

Home Page:https://lvgl.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lvgl.h path

C47D opened this issue · comments

There are some includes like this #include "lvgl/lvgl.h", should we update them to:

#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif

Forgot to work on my fork of lv_examples, here's the diff you need to apply:

diff --git a/lv_examples.h b/lv_examples.h
index 7195d36..8d04bbf 100644
--- a/lv_examples.h
+++ b/lv_examples.h
@@ -13,7 +13,7 @@ extern "C" {
 /*********************
  *      INCLUDES
  *********************/
-#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
+#if defined(LV_CONF_INCLUDE_SIMPLE)
 #include "lvgl.h"
 #else
 #include "../lvgl/lvgl.h"
diff --git a/src/lv_demo_music/assets/img_lv_demo_music_btn_play.c b/src/lv_demo_music/assets/img_lv_demo_music_btn_play.c
index b8685b5..88dbeaa 100644
--- a/src/lv_demo_music/assets/img_lv_demo_music_btn_play.c
+++ b/src/lv_demo_music/assets/img_lv_demo_music_btn_play.c
@@ -1,4 +1,9 @@
+#ifdef LV_CONF_INCLUDE_SIMPLE
+#include "lvgl.h"
+#else
 #include "lvgl/lvgl.h"
+#endif
+
 #include "../lv_demo_music.h"
 #if LV_USE_DEMO_MUSIC

LV_LVGL_H_INCLUDE_SIMPLE should be correct here.
LV_CONF_INCLUDE_SIMPLE is used only in lv_conf_internal.h.

I see, where's LV_LVGL_H_INCLUDE_SIMPLE defined? We're defining LV_CONF_INCLUDE_SIMPLE in the project configuration, maybe that's why I didn't saw any warning while using it.

I see, where's LV_LVGL_H_INCLUDE_SIMPLE defined?

It should be defined in the project's config file too similarly to LV_CONF_INCLUDE_SIMPLE.

Ok, do you want me to send a PR to fix that in here?

I've just fixed it in img_lv_demo_music_btn_play.c.

Thanks, the lv_port_esp32 repo now builds!