diff --git a/CMakeLists.txt b/CMakeLists.txt index 905687ae75..53e29fb10e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,8 @@ # get IDF version for comparison set(idf_version "${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}") +set(priv_requires "") + # set conversion sources set(srcs conversions/yuv.c @@ -18,8 +20,6 @@ set(include_dirs conversions/include ) -set(COMPONENT_REQUIRES driver) - # set driver sources only for supported platforms if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET STREQUAL "esp32s3") list(APPEND srcs @@ -75,7 +75,7 @@ if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET ST ) endif() - set(priv_requires freertos nvs_flash esp_mm) + list(APPEND priv_requires freertos nvs_flash esp_mm) set(min_version_for_esp_timer "4.2") if (idf_version VERSION_GREATER_EQUAL min_version_for_esp_timer) @@ -91,16 +91,18 @@ if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET ST list(APPEND srcs driver/sccb.c) endif() - if (idf_version VERSION_GREATER_EQUAL "6.0") - list(APPEND priv_requires esp_driver_gpio) - endif() +endif() +set(req driver) +if (idf_version VERSION_GREATER_EQUAL "6.0") + list(APPEND priv_requires esp_driver_gpio esp_driver_spi esp_driver_i2c) + list(APPEND req esp_driver_ledc) endif() idf_component_register( SRCS ${srcs} INCLUDE_DIRS ${include_dirs} PRIV_INCLUDE_DIRS ${priv_include_dirs} - REQUIRES driver # due to include of driver/gpio.h in esp_camera.h + REQUIRES ${req} PRIV_REQUIRES ${priv_requires} ) diff --git a/idf_component.yml b/idf_component.yml index 0dea1cc30b..0ebeddb392 100644 --- a/idf_component.yml +++ b/idf_component.yml @@ -6,5 +6,5 @@ repository: https://github.com/espressif/esp32-camera.git dependencies: idf: ">=5.1" esp_jpeg: - version: "^1.3.0" + version: "^1.3.1" public: true