-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install this project as a library submodule breaks build #85
Comments
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 |
@C47D Legend!
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)
Fixed this for me. Thanks! |
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) |
In my case the above compiles |
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 |
@C47D Just something to note... |
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 for trying, I've just updated the README with the workaround. |
@C47D I want to clarify the following thing: you are using I have made this:
and it solved the error:
So, looks like with this fix the workaround described in README is not required. |
yes. Another way would be
|
…m described in lvgl#85 issue.
Describe the issue
this commit changed instructions on adding the library into the components folder as aposed to an external directory. Following these instructions breaks the build
to reproduce...
idf.py fullclean
build is now broken adding references in the CMakeLists.txt files doesn't make any difference
Expected Results
idf.py build
builds the project with no errorsActual Results
cmake errors
ESP-IDF version
4.0
Development machine OS
windows
Compilation warnings/errors (if available)
If possible, copy the compilation log into a file and attach it here
C:\projects\spike\testv1>idf.py build
Checking Python dependencies...
Python requirements from C:\esp\esp-idf\requirements.txt are satisfied.
Executing action: all (aliases: build)
Running ninja in directory c:\projects\spike\testv1\build
Executing "ninja all"...
[0/1] Re-running CMake...
-- mconf-idf version mconf-v4.6.0.0-idf-20190628-win32
-- Project version: 032159a-dirty
-- Building ESP-IDF components for target esp32
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.25.1.windows.1")
CMake Error at C:/esp/esp-idf/tools/cmake/component.cmake:222 (message):
CMake Warning (dev) at build_properties.temp.cmake:2 (set):
Call Stack (most recent call first):
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at
C:/esp/tools/.espressif/tools/cmake/3.13.4/share/cmake-3.13/Modules/ExternalProject.cmake:980
(define_property):
Call Stack (most recent call first):
Call Stack (most recent call first):
C:/esp/esp-idf/tools/cmake/build.cmake:404 (__component_get_requirements)
C:/esp/esp-idf/tools/cmake/project.cmake:337 (idf_build_process)
CMakeLists.txt:12 (project)
The text was updated successfully, but these errors were encountered: