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 05d2f55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 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
11 changes: 6 additions & 5 deletions src/lv_conf_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@

#include <stdint.h>

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

#ifdef CONFIG_LV_CONF_SKIP
#define LV_CONF_SKIP
/*Handle special Kconfig options*/
#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 05d2f55

Please sign in to comment.