Skip to content

Commit f2e80cb

Browse files
authored
Merge pull request lvgl#265 from tore-espressif/feature/clean_build
Remove Extra component dirs definition
2 parents 70ba70a + 5d3a28e commit f2e80cb

File tree

7 files changed

+9
-21
lines changed

7 files changed

+9
-21
lines changed

CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ cmake_minimum_required(VERSION 3.5)
22

33
if (NOT DEFINED PROJECT_NAME)
44
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
5-
6-
list(APPEND EXTRA_COMPONENT_DIRS components/lvgl_esp32_drivers components/lvgl_esp32_drivers/lvgl_touch components/lvgl_esp32_drivers/lvgl_tft)
7-
85
project(lvgl-demo)
9-
endif (NOT DEFINED PROJECT_NAME)
6+
else()
7+
message(FATAL_ERROR "LV PORT ESP32: This must be a project's main CMakeLists.txt.")
8+
endif()

Makefile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,4 @@
44
#
55

66
PROJECT_NAME := lvgl-demo
7-
8-
# Add new components (source folders)
9-
EXTRA_COMPONENT_DIRS := components/lvgl_esp32_drivers/lvgl_tft
10-
EXTRA_COMPONENT_DIRS += components/lvgl_esp32_drivers/lvgl_touch
11-
# Must be before include $(IDF_PATH)/make/project.mk
12-
# $(PROJECT_PATH)/xxx didn't work -> use $(abspath xxx) instead
13-
147
include $(IDF_PATH)/make/project.mk
15-

components/lv_examples/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ idf_component_register(SRCS ${SOURCES}
66
INCLUDE_DIRS .
77
REQUIRES lvgl)
88

9+
else()
10+
message(FATAL_ERROR "LVGL LV examples: ESP_PLATFORM is not defined. Try reinstalling ESP-IDF.")
911
endif()

components/lv_examples/component.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Component Makefile
33
#
44

5-
CFLAGS += -DLV_CONF_INCLUDE_SIMPLE
5+
CFLAGS += -DLV_LVGL_H_INCLUDE_SIMPLE
66

77
COMPONENT_SRCDIRS := lv_examples \
88
lv_examples/src/lv_demo_benchmark \

main/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
set(SOURCES main.c)
2-
idf_component_register(SRCS ${SOURCES}
3-
INCLUDE_DIRS .)
4-
5-
target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DLV_LVGL_H_INCLUDE_SIMPLE")
1+
idf_component_register(SRCS main.c)

main/component.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@
33
#
44
# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.)
55

6-
CFLAGS += -DLV_CONF_INCLUDE_SIMPLE
7-
CFLAGS += -DLV_LVGL_H_INCLUDE_SIMPLE
6+
CFLAGS+= -DLV_LVGL_H_INCLUDE_SIMPLE

main/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "driver/gpio.h"
2222

2323
/* Littlevgl specific */
24-
#ifdef LV_CONF_INCLUDE_SIMPLE
24+
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
2525
#include "lvgl.h"
2626
#else
2727
#include "lvgl/lvgl.h"

0 commit comments

Comments
 (0)