Skip to content

Commit

Permalink
CMake: Allow building LVGL without kconfig
Browse files Browse the repository at this point in the history
Also add ../ to the search path, such that lv_conf.h could be found on parent directory

Related discussion: #1875 (comment)
  • Loading branch information
amirgon committed Mar 24, 2021
1 parent e1ac174 commit 7cb23e6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if(ESP_PLATFORM)
file(GLOB_RECURSE SOURCES src/*.c)

idf_component_register(SRCS ${SOURCES}
INCLUDE_DIRS . src
INCLUDE_DIRS . src ../
REQUIRES main)

target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DLV_CONF_INCLUDE_SIMPLE")
Expand Down
9 changes: 5 additions & 4 deletions scripts/lv_conf_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
#include <stdint.h>
/* Handle special Kconfig options */
#include "lv_conf_kconfig.h"
#ifdef CONFIG_LV_CONF_SKIP
#define LV_CONF_SKIP
#ifndef LV_KCONFIG_IGNORE
# include "lv_conf_kconfig.h"
# ifdef CONFIG_LV_CONF_SKIP
# define LV_CONF_SKIP
# endif
#endif
/* If "lv_conf.h" is available from here try to use it later.*/
Expand Down
9 changes: 5 additions & 4 deletions src/lv_conf_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
#include <stdint.h>

/* Handle special Kconfig options */
#include "lv_conf_kconfig.h"

#ifdef CONFIG_LV_CONF_SKIP
#define LV_CONF_SKIP
#ifndef LV_KCONFIG_IGNORE
# include "lv_conf_kconfig.h"
# ifdef CONFIG_LV_CONF_SKIP
# define LV_CONF_SKIP
# endif
#endif

/* If "lv_conf.h" is available from here try to use it later.*/
Expand Down

0 comments on commit 7cb23e6

Please sign in to comment.