Comments (10)
@C47D Just something to note...
ESP-IDF should automatically include all assets in the components folder which will make the cmakelits.txt file simpler. I'll test it out and let you know
from lv_port_esp32.
Hi @Mair,
Thanks for the detailed report, I was able to reproduce the issue and did a quick fix. The source of the issue was that I forgot to add a note about the CMakeLists.txt on the lv_port_esp32 repo and also a typo in the main/CMakeLists.txt on your repo.
Here are the fixes, please let me know if it works for you so I can update the README.
Your application main/CMakeList.txt should look like this (the typo was lvgl_examples, it must be lv_examples):
set (SOURCES main.c)
idf_component_register(SRCS ${SOURCES}
INCLUDE_DIRS .
REQUIRES lvgl_esp32_drivers lvgl lv_examples lvgl_tft lvgl_touch)
target_compile_definitions(${COMPONENT_LIB} PRIVATE LV_CONF_INCLUDE_SIMPLE=1)
The file on components/lv_port_esp32/CMakeLists.txt should look like this:
cmake_minimum_required(VERSION 3.5)
# include($ENV{IDF_PATH}/tools/cmake/project.cmake)
set(EXTRA_COMPONENT_DIRS components/lvgl_esp32_drivers components/lvgl_esp32_drivers/lvgl_touch components/lvgl_esp32_drivers/lvgl_tft)
# project(lvgl-demo)
With the include and project lines commented out.
Let me know if you have any issues after that changes, I'm able to build the demo application after it.
Regards
Carlos
from lv_port_esp32.
@C47D Legend!
The file on components/lv_port_esp32/CMakeLists.txt should look like this:
cmake_minimum_required(VERSION 3.5)
# include($ENV{IDF_PATH}/tools/cmake/project.cmake)
set(EXTRA_COMPONENT_DIRS components/lvgl_esp32_drivers components/lvgl_esp32_drivers/lvgl_touch components/lvgl_esp32_drivers/lvgl_tft)
# project(lvgl-demo)
With the include and project lines commented out.
Fixed this for me. Thanks!
from lv_port_esp32.
Can you test this?
cmake_minimum_required(VERSION 3.5)
# include($ENV{IDF_PATH}/tools/cmake/project.cmake)
set(EXTRA_COMPONENT_DIRS components/lvgl_esp32_drivers components/lvgl_esp32_drivers/lvgl_touch components/lvgl_esp32_drivers/lvgl_tft)
if (NOT DEFINED PROJECT_NAME)
project(lvgl-demo)
endif (NOT DEFINED PROJECT_NAME)
from lv_port_esp32.
In my case the above compiles
from lv_port_esp32.
Ok, I will update the README with the following info
cmake_minimum_required(VERSION 3.5)
# include($ENV{IDF_PATH}/tools/cmake/project.cmake)
set(EXTRA_COMPONENT_DIRS components/lvgl_esp32_drivers components/lvgl_esp32_drivers/lvgl_touch components/lvgl_esp32_drivers/lvgl_tft)
if (NOT DEFINED PROJECT_NAME)
project(lvgl-demo)
endif (NOT DEFINED PROJECT_NAME)
Thanks for testing it tho, I will close the issue.
Regards
from lv_port_esp32.
I was kind of hoping to get away with something like
cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(menu_v2_poc)
and for main
set(COMPONENT_SRCS "main.c")
set(COMPONENT_ADD_INCLUDEDIRS "." )
register_component()
But due to the nested components folder the includes don't get picked up :(. In any case happy to go with the above solution,
Thanks again
from lv_port_esp32.
Thanks for trying, I've just updated the README with the workaround.
from lv_port_esp32.
@C47D I want to clarify the following thing: you are using if (NOT DEFINED PROJECT_NAME)
to disable call of project(lvgl-demo)
. How about to use the same if
to disable include
directive with no need for make any manual changes (comment this line manually in sub-module repository)?
I have made this:
if (NOT DEFINED PROJECT_NAME)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
endif (NOT DEFINED PROJECT_NAME)
and it solved the error:
...
CMake Error at /Users/mdobryakov/.esp-idf/tools/cmake/component.cmake:221 (message):
CMake Error at
/Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.17/Modules/ExternalProject.cmake:1034
(define_property):
define_property command is not scriptable
...
So, looks like with this fix the workaround described in README is not required.
from lv_port_esp32.
yes. Another way would be
cmake_minimum_required(VERSION 3.5)
if (NOT DEFINED PROJECT_NAME)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
endif (NOT DEFINED PROJECT_NAME)
set(EXTRA_COMPONENT_DIRS components/lvgl_esp32_drivers components/lvgl_esp32_drivers/lvgl_touch components/lvgl_esp32_drivers/lvgl_tft)
if (NOT DEFINED PROJECT_NAME)
project(lvgl-demo)
endif (NOT DEFINED PROJECT_NAME)
from lv_port_esp32.
Related Issues (20)
- Portrait mode of demos doesn't display correctly
- The link to the forum when you write a PR/issue is incorrect HOT 1
- build with esp-idf-4.4.3 fails HOT 1
- failed to run idf.py menuconfig HOT 3
- updated LVGL+squareline studio+ ESP32 HOT 2
- Demo on older esp-wrover-kit board ( not v4.1) HOT 2
- Display not showing the correct windows while running this example HOT 2
- Sunton ESP32-8048S070 board HOT 8
- How can I add my own components to the project
- Unable to compile on esp-idf version 5.0 HOT 4
- undefined reference to `lv_obj_set_scroll_propagation'
- Cant turn off LV_USE_FLEX
- Horizontal scrolling HOT 4
- fatal error: Arduino_H7_Video.h: No such file or directory
- ESP32C3 - non-LVGL task (temp reading) causes TFT display to go blank and stay blank on second run of task HOT 1
- ssd1306 driver
- ssd1306
- how to use this port in arduino ide ?
- LVGL Lottie plays partially then crashes HOT 2
- 90 degree rotation issue, Screen rotate 90 , 180, 270, 0 degree contineously
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lv_port_esp32.