|
1 | | -# CMakeLists for ESP-IDF |
| 1 | +set (LGFX_ROOT ${CMAKE_CURRENT_LIST_DIR}) |
2 | 2 |
|
3 | | -set(COMPONENT_ADD_INCLUDEDIRS |
4 | | - src |
5 | | - ) |
6 | | -file(GLOB SRCS |
7 | | - src/lgfx/Fonts/efont/*.c |
8 | | - src/lgfx/Fonts/IPA/*.c |
9 | | - src/lgfx/utility/*.c |
10 | | - src/lgfx/v1/*.cpp |
11 | | - src/lgfx/v1/misc/*.cpp |
12 | | - src/lgfx/v1/panel/*.cpp |
13 | | - src/lgfx/v1/platforms/arduino_default/*.cpp |
14 | | - src/lgfx/v1/platforms/esp32/*.cpp |
15 | | - src/lgfx/v1/platforms/esp32c3/*.cpp |
16 | | - src/lgfx/v1/platforms/esp32s2/*.cpp |
17 | | - src/lgfx/v1/platforms/esp32s3/*.cpp |
18 | | - src/lgfx/v1/touch/*.cpp |
19 | | - ) |
| 3 | +# Espressif ESP* based boards |
| 4 | +if (DEFINED ESP_PLATFORM) |
| 5 | +include(${LGFX_ROOT}/boards.cmake/esp-idf.cmake) |
20 | 6 |
|
21 | | -set(COMPONENT_SRCS ${SRCS}) |
| 7 | +# Raspberry Pi RP* based boards |
| 8 | +elseif ((DEFINED PICO_PLATFORM) OR (DEFINED PICO_BOARD)) |
| 9 | +include(${LGFX_ROOT}/boards.cmake/pico-sdk.cmake) |
22 | 10 |
|
23 | | -if (IDF_VERSION_MAJOR GREATER_EQUAL 5) |
24 | | - set(COMPONENT_REQUIRES nvs_flash efuse esp_lcd driver esp_timer) |
25 | | -elseif ((IDF_VERSION_MAJOR EQUAL 4) AND (IDF_VERSION_MINOR GREATER 3) OR IDF_VERSION_MAJOR GREATER 4) |
26 | | - set(COMPONENT_REQUIRES nvs_flash efuse esp_lcd) |
| 11 | +# Cannot determine boards type |
27 | 12 | else() |
28 | | - set(COMPONENT_REQUIRES nvs_flash efuse) |
| 13 | +message("Error: No platform specified") |
29 | 14 | endif() |
30 | | - |
31 | | - |
32 | | -### If you use arduino-esp32 components, please activate next comment line. |
33 | | -# list(APPEND COMPONENT_REQUIRES arduino-esp32) |
34 | | - |
35 | | - |
36 | | -message(STATUS "LovyanGFX use components = ${COMPONENT_REQUIRES}") |
37 | | - |
38 | | -register_component() |
0 commit comments