xiaoxiang781216 commented on a change in pull request #334:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/334#discussion_r455256739



##########
File path: examples/lvgldemo/Makefile
##########
@@ -86,11 +86,18 @@ endif
 
 MAINSRC = lvgldemo.c
 
-LVGL_SRC_DIR=$(APPDIR)/graphics/lvgl/lvgl
-LVGL_DIR=$(APPDIR)/graphics/lvgl
+# Upstream `lv_examples/lv_examples.h` includes LVGL
+# in following way `#include "../lvgl/lvgl.h"`, for no clean reason.
+#
+# The way that we export LVGL offers `#include <lvgl/lvgl.h>`, so it won't 
work.
+# Solution below is not pretty but it fixes `lv_examples` without patching.
+#
+# Remove this fix when you will get better idea.
+
+LVGL_EXAMPLE_INCLUDE_FIX=$(APPDIR)/graphics/lvgl/lvgl

Review comment:
       We can mdoify the inclusion to lvgl.h by LV_LVGL_H_INCLUDE_SIMPLE macro 
like this:
   CFLAGS += ${shell $(DEFINE) "$(CC)" LV_LVGL_H_INCLUDE_SIMPLE}
   Here is the related code: 
https://github.com/lvgl/lv_examples/blob/master/lv_examples.h#L16
   

##########
File path: graphics/lvgl/Makefile
##########
@@ -78,20 +76,15 @@ $(LVGL_UNPACKNAME): $(LVGL_TARBALL)
        $(Q) mv lvgl-$(LVGL_VERSION) $(LVGL_UNPACKNAME)
        $(Q) touch $(LVGL_UNPACKNAME)
 
-lvgl/lvgl.h: $(LVGL_UNPACKNAME)
-
-$(APPDIR)/include/graphics/lvgl.h: lvgl/lvgl.h
-       @echo "CP: lvgl/lvgl.h"
-       $(Q) cp lvgl/lvgl.h $(APPDIR)/include/graphics/lvgl.h
+$(LVGL_UNPACKNAME)/lvgl.h: $(LVGL_UNPACKNAME)
 
-context:: $(LVGL_UNPACKNAME) $(APPDIR)/include/graphics/lvgl.h
+context:: $(LVGL_UNPACKNAME) lvgl/lvgl.h

Review comment:
       Remove lvgl/lvgl.h, don't need anymore.

##########
File path: graphics/lvgl/Makefile
##########
@@ -78,20 +76,15 @@ $(LVGL_UNPACKNAME): $(LVGL_TARBALL)
        $(Q) mv lvgl-$(LVGL_VERSION) $(LVGL_UNPACKNAME)
        $(Q) touch $(LVGL_UNPACKNAME)
 
-lvgl/lvgl.h: $(LVGL_UNPACKNAME)
-
-$(APPDIR)/include/graphics/lvgl.h: lvgl/lvgl.h
-       @echo "CP: lvgl/lvgl.h"
-       $(Q) cp lvgl/lvgl.h $(APPDIR)/include/graphics/lvgl.h
+$(LVGL_UNPACKNAME)/lvgl.h: $(LVGL_UNPACKNAME)

Review comment:
       Remove too




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to