diff --git a/Buildscripts/sdkconfig/default.properties b/Buildscripts/sdkconfig/default.properties index 601d65cd..5b2a93b0 100644 --- a/Buildscripts/sdkconfig/default.properties +++ b/Buildscripts/sdkconfig/default.properties @@ -16,6 +16,8 @@ CONFIG_LV_USE_MSGBOX=n CONFIG_LV_USE_SPINNER=n CONFIG_LV_USE_WIN=n CONFIG_LV_USE_SNAPSHOT=y +CONFIG_LV_BUILD_EXAMPLES=n +CONFIG_LV_BUILD_DEMOS=n CONFIG_FREERTOS_HZ=1000 CONFIG_FREERTOS_TASK_NOTIFICATION_ARRAY_ENTRIES=2 CONFIG_FREERTOS_SMP=n diff --git a/CMakeLists.txt b/CMakeLists.txt index b71b15b2..1ea78f33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,7 +104,9 @@ if (NOT DEFINED ENV{ESP_IDF_VERSION}) add_subdirectory(Libraries/SDL) # Added as idf component for ESP and as library for other targets # LVGL - add_compile_definitions($<$:LV_USE_DRAW_SDL=1>) + set(CONFIG_LV_BUILD_DEMOS OFF CACHE BOOL "" FORCE) + set(CONFIG_LV_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) + set(CONFIG_LV_USE_DRAW_SDL ON CACHE BOOL "" FORCE) add_subdirectory(Libraries/lvgl) # Added as idf component for ESP and as library for other targets target_link_libraries(lvgl PRIVATE SDL2-static) diff --git a/Firmware/Source/Main.cpp b/Firmware/Source/Main.cpp index 6d498b1b..926da64d 100644 --- a/Firmware/Source/Main.cpp +++ b/Firmware/Source/Main.cpp @@ -2,6 +2,8 @@ #ifdef ESP_PLATFORM #include +#else +#include #endif // Each board project declares this variable diff --git a/Libraries/cJSON/CMakeLists.txt b/Libraries/cJSON/CMakeLists.txt index 104bab31..2a9be2d4 100644 --- a/Libraries/cJSON/CMakeLists.txt +++ b/Libraries/cJSON/CMakeLists.txt @@ -1,6 +1,4 @@ -file(GLOB SOURCES "cJSON/*.c") - add_library(cJSON STATIC) -target_sources(cJSON PRIVATE ${SOURCES}) +target_sources(cJSON PRIVATE cJSON/cJSON.c cJSON/cJSON_Utils.c) include_directories(cJSON "cJSON/") target_include_directories(cJSON PUBLIC "cJSON/") diff --git a/lv_conf.h b/lv_conf.h index 73bd3fe1..c6b7b0fc 100644 --- a/lv_conf.h +++ b/lv_conf.h @@ -167,7 +167,7 @@ #define LV_USE_DRAW_DAVE2D 0 /* Draw using cached SDL textures*/ -#define LV_USE_DRAW_SDL 0 +#define LV_USE_DRAW_SDL 1 /* Use VG-Lite GPU. */ #define LV_USE_DRAW_VG_LITE 0 @@ -902,12 +902,14 @@ *==================*/ /*Enable the examples to be built with the library*/ -#define LV_BUILD_EXAMPLES 1 +#define LV_BUILD_EXAMPLES 0 /*=================== * DEMO USAGE ====================*/ +#define LV_BUILD_DEMOS 0 + /*Show some widget. It might be required to increase `LV_MEM_SIZE` */ #define LV_USE_DEMO_WIDGETS 0 #if LV_USE_DEMO_WIDGETS