File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- [submodule "common "]
2- path = common
3- url = https:// github.com/ esp-idf-lib/common .git
1+ [submodule "eil-cmake-utils "]
2+ path = eil-cmake-utils
3+ url = git@ github.com: esp-idf-lib/eil-cmake-utils .git
Original file line number Diff line number Diff line change 1- # ESP-IDF CMake component for i2cdev library
2- if (${IDF_VERSION_MAJOR} STREQUAL 5 AND ${IDF_VERSION_MINOR} LESS 3)
3- # Use driver component as esp_driver_gpio is not available before 5.3
4- set (req driver freertos log esp_timer)
1+ list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} /eil-cmake-utils/cmake)
2+ include (eil_check_idf_features )
3+ eil_check_idf_has_esp_drivers ()
4+
5+ # List of common ESP-IDF components required by this component
6+ set (REQUIRED_COMPONENTS log freertos esp_idf_lib_helpers)
7+
8+ # Add version-specific required componenets
9+ if (EIL_IDF_HAS_ESP_DRIVERS)
10+ list (APPEND REQUIRED_COMPONENTS esp_driver_gpio esp_driver_i2c)
511else ()
6- set (req esp_driver_gpio esp_driver_i2c freertos esp_idf_lib_helpers )
12+ list ( APPEND REQUIRED_COMPONENTS driver )
713endif ()
814
915# ESP-IDF version detection for automatic driver selection
@@ -38,13 +44,6 @@ endif()
3844# Register the component
3945idf_component_register (SRCS ${SRCS}
4046 INCLUDE_DIRS "."
41- REQUIRES ${req} )
42-
47+ REQUIRES ${REQUIRED_COMPONENTS} )
4348
44- # include common cmake file for components
45- set (ESP_IDF_LIB_CMAKE ${CMAKE_CURRENT_LIST_DIR} /common/cmake/esp-idf-lib.cmake)
46- if (EXISTS ${ESP_IDF_LIB_CMAKE} )
47- include (${ESP_IDF_LIB_CMAKE} )
48- else ()
49- message (WARNING "${ESP_IDF_LIB_CMAKE} not found" )
50- endif ()
49+ include (eil_ci )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments