fix(lv_conf): get rid of the LV_CONF path building macros (#7335)
Signed-off-by: Felipe Neves <felipe@lvgl.io>
This commit is contained in:
@@ -36,7 +36,9 @@ will attempt to include ``lv_conf.h`` simply with ``#include "lv_conf.h"``.
|
|||||||
You can even use a different name for ``lv_conf.h``. The custom path can
|
You can even use a different name for ``lv_conf.h``. The custom path can
|
||||||
be set via the :c:macro:`LV_CONF_PATH` define. For example
|
be set via the :c:macro:`LV_CONF_PATH` define. For example
|
||||||
``-DLV_CONF_PATH="/home/joe/my_project/my_custom_conf.h"``. If this define
|
``-DLV_CONF_PATH="/home/joe/my_project/my_custom_conf.h"``. If this define
|
||||||
is set :c:macro:`LV_CONF_SKIP` is assumed to be ``0``.
|
is set :c:macro:`LV_CONF_SKIP` is assumed to be ``0``. Please notice,
|
||||||
|
when defining the :c:macro:`LV_CONF_PATH`, you need to make sure it is
|
||||||
|
defined as a string, otherwise a build error will be raised.
|
||||||
|
|
||||||
If :c:macro:`LV_CONF_SKIP` is defined, LVGL will not try to include
|
If :c:macro:`LV_CONF_SKIP` is defined, LVGL will not try to include
|
||||||
``lv_conf.h``. Instead you can pass the config defines using build
|
``lv_conf.h``. Instead you can pass the config defines using build
|
||||||
|
|||||||
@@ -74,11 +74,7 @@ fout.write(
|
|||||||
/* If lv_conf.h is not skipped, include it. */
|
/* If lv_conf.h is not skipped, include it. */
|
||||||
#if !defined(LV_CONF_SKIP) || defined(LV_CONF_PATH)
|
#if !defined(LV_CONF_SKIP) || defined(LV_CONF_PATH)
|
||||||
#ifdef LV_CONF_PATH /* If there is a path defined for lv_conf.h, use it */
|
#ifdef LV_CONF_PATH /* If there is a path defined for lv_conf.h, use it */
|
||||||
#define __LV_TO_STR_AUX(x) #x
|
#include LV_CONF_PATH /* Note: Make sure to define custom CONF_PATH as a string */
|
||||||
#define __LV_TO_STR(x) __LV_TO_STR_AUX(x)
|
|
||||||
#include __LV_TO_STR(LV_CONF_PATH)
|
|
||||||
#undef __LV_TO_STR_AUX
|
|
||||||
#undef __LV_TO_STR
|
|
||||||
#elif defined(LV_CONF_INCLUDE_SIMPLE) /* Or simply include lv_conf.h is enabled. */
|
#elif defined(LV_CONF_INCLUDE_SIMPLE) /* Or simply include lv_conf.h is enabled. */
|
||||||
#include "lv_conf.h"
|
#include "lv_conf.h"
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -52,11 +52,7 @@
|
|||||||
/* If lv_conf.h is not skipped, include it. */
|
/* If lv_conf.h is not skipped, include it. */
|
||||||
#if !defined(LV_CONF_SKIP) || defined(LV_CONF_PATH)
|
#if !defined(LV_CONF_SKIP) || defined(LV_CONF_PATH)
|
||||||
#ifdef LV_CONF_PATH /* If there is a path defined for lv_conf.h, use it */
|
#ifdef LV_CONF_PATH /* If there is a path defined for lv_conf.h, use it */
|
||||||
#define __LV_TO_STR_AUX(x) #x
|
#include LV_CONF_PATH /* Note: Make sure to define custom CONF_PATH as a string */
|
||||||
#define __LV_TO_STR(x) __LV_TO_STR_AUX(x)
|
|
||||||
#include __LV_TO_STR(LV_CONF_PATH)
|
|
||||||
#undef __LV_TO_STR_AUX
|
|
||||||
#undef __LV_TO_STR
|
|
||||||
#elif defined(LV_CONF_INCLUDE_SIMPLE) /* Or simply include lv_conf.h is enabled. */
|
#elif defined(LV_CONF_INCLUDE_SIMPLE) /* Or simply include lv_conf.h is enabled. */
|
||||||
#include "lv_conf.h"
|
#include "lv_conf.h"
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ endif()
|
|||||||
|
|
||||||
# Options lvgl and examples are compiled with.
|
# Options lvgl and examples are compiled with.
|
||||||
set(COMPILE_OPTIONS
|
set(COMPILE_OPTIONS
|
||||||
-DLV_CONF_PATH=${LVGL_TEST_DIR}/src/lv_test_conf.h
|
-DLV_CONF_PATH="${LVGL_TEST_DIR}/src/lv_test_conf.h"
|
||||||
-DLV_BUILD_TEST
|
-DLV_BUILD_TEST
|
||||||
${BUILD_OPTIONS}
|
${BUILD_OPTIONS}
|
||||||
${BUILD_TARGET_DEF}
|
${BUILD_TARGET_DEF}
|
||||||
|
|||||||
Reference in New Issue
Block a user