Просмотр исходного кода

Fix esphome/core/hal.h not found in vendored GxEPD2 build

arduino_compat/Arduino.h includes esphome/core/hal.h, which only
resolves relative to the generated project's src/ directory. Add
that as an include dir on the vendor component too.
ZiB 1 месяц назад
Родитель
Сommit
4144bfd7c9
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      components/gxepd2/vendor/CMakeLists.txt

+ 4 - 1
components/gxepd2/vendor/CMakeLists.txt

@@ -14,6 +14,9 @@ endif()
 idf_component_register(
 idf_component_register(
     SRCS ${GXEPD2_SOURCES}
     SRCS ${GXEPD2_SOURCES}
     INCLUDE_DIRS "src"
     INCLUDE_DIRS "src"
-    PRIV_INCLUDE_DIRS "../arduino_compat"
+    # ${CMAKE_SOURCE_DIR}/src is the ESPHome-generated main component's source
+    # root: arduino_compat/Arduino.h includes "esphome/core/hal.h", which only
+    # resolves relative to that directory.
+    PRIV_INCLUDE_DIRS "../arduino_compat" "${CMAKE_SOURCE_DIR}/src"
     PRIV_REQUIRES driver
     PRIV_REQUIRES driver
 )
 )