u8g2-hal-esp-idf icon indicating copy to clipboard operation
u8g2-hal-esp-idf copied to clipboard

Failure to build with espidf 5.x

Open thedeadliestcatch opened this issue 10 months ago • 2 comments

Given the following configuration:

$ cat CMakeLists.txt 
cmake_minimum_required(VERSION 3.16.0)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
list(APPEND EXTRA_COMPONENT_DIRS components)

project(blah)

$ ls components/
u8g2  u8g2-hal-esp-idf

The following error occurs:

  CMake Error at components/u8g2/CMakeLists.txt:2 (project):

    project command is not scriptable

It is properly documented in another issue with no resolution.

thedeadliestcatch avatar Apr 17 '24 13:04 thedeadliestcatch

Hello, I have the same issue. Where you belt o fix that somehow? Cheers.

FloMaxl avatar Apr 20 '24 10:04 FloMaxl

I believe I am on 5 and was able to get it to compile. It took me a few steps and i havent quite cleaned up the code, so here is what i did:

  • main project CMakeLists.txt, i needed to add PRIV_REQUIRES:
idf_component_register(SRCS "esp32.cpp"
                    INCLUDE_DIRS "."
                    REQUIRES u8g2
                    PRIV_REQUIRES u8g2_hal_esp_idf)
  • u8g2 components dir, i modified the CMakeLists.txt to match this one

Hope this helps

jareddlc avatar Apr 20 '24 21:04 jareddlc