CMakeLists.txt 1.4 KB

123456789101112131415161718192021222324252627
  1. # ESP-IDF component manifest for vendored GxEPD2. gxepd2_sources.cmake is
  2. # generated by display.py at codegen time, listing only the driver .cpp
  3. # files the current config actually selected; the GLOB fallback below is
  4. # for building this component outside an ESPHome-generated project.
  5. set(GXEPD2_MANIFEST "${CMAKE_SOURCE_DIR}/src/gxepd2_sources.cmake")
  6. if(EXISTS "${GXEPD2_MANIFEST}")
  7. include("${GXEPD2_MANIFEST}")
  8. else()
  9. # Fallback for building outside an ESPHome-generated project.
  10. file(GLOB_RECURSE GXEPD2_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
  11. list(FILTER GXEPD2_SOURCES EXCLUDE REGEX "/it8951/|GxEPD2_1248")
  12. endif()
  13. idf_component_register(
  14. SRCS ${GXEPD2_SOURCES}
  15. # arduino_compat is public: GxEPD2's own public headers (e.g. GxEPD2_BW.h)
  16. # include <Adafruit_GFX.h>, so consumers compiling those headers (the main
  17. # "src" component, via gxepd2_display.h) need it on their include path too
  18. # - a PRIV_INCLUDE_DIRS entry isn't visible outside this component.
  19. INCLUDE_DIRS "src" "../arduino_compat"
  20. # ${CMAKE_SOURCE_DIR}/src is the ESPHome-generated main component's source
  21. # root: arduino_compat/Arduino.h includes "esphome/core/hal.h", which only
  22. # resolves relative to that directory. Private is enough here - the main
  23. # component already has its own source root on its include path.
  24. PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/src"
  25. PRIV_REQUIRES driver
  26. )