From a995695cdf51d8ee476f19e619851fd40d7c90cf Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 19 Apr 2021 19:04:46 +0200 Subject: [PATCH] feat(conf) automatically enable LV_LVGL_H_INCLUDE_SIMPLE if lvgl.h can be included --- scripts/lv_conf_checker.py | 5 +++++ src/lv_conf_internal.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/scripts/lv_conf_checker.py b/scripts/lv_conf_checker.py index d7cdaa2a4..f83607958 100755 --- a/scripts/lv_conf_checker.py +++ b/scripts/lv_conf_checker.py @@ -42,6 +42,11 @@ fout.write( # define LV_CONF_INCLUDE_SIMPLE # endif # endif +# if __has_include("lvgl.h") +# ifndef LV_LVGL_H_INCLUDE_SIMPLE +# define LV_LVGL_H_INCLUDE_SIMPLE +# endif +# endif #endif /*If lv_conf.h is not skipped include it*/ diff --git a/src/lv_conf_internal.h b/src/lv_conf_internal.h index b06911ff6..5632b41e6 100644 --- a/src/lv_conf_internal.h +++ b/src/lv_conf_internal.h @@ -25,6 +25,11 @@ # define LV_CONF_INCLUDE_SIMPLE # endif # endif +# if __has_include("lvgl.h") +# ifndef LV_LVGL_H_INCLUDE_SIMPLE +# define LV_LVGL_H_INCLUDE_SIMPLE +# endif +# endif #endif /*If lv_conf.h is not skipped include it*/