From 344a0ccf14fa8574b687e57513de56975cf881b9 Mon Sep 17 00:00:00 2001 From: Vilem Zavodny Date: Thu, 9 Oct 2025 11:11:37 +0200 Subject: [PATCH 1/5] fix: Fix requires by IDF6 --- CMakeLists.txt | 9 +++++---- idf_component.yml | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 905687ae75..e8f85e576a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,8 +18,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 @@ -91,8 +89,11 @@ if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET ST list(APPEND srcs driver/sccb.c) endif() + set(req "") if (idf_version VERSION_GREATER_EQUAL "6.0") - list(APPEND priv_requires esp_driver_gpio) + list(APPEND priv_requires esp_driver_gpio esp_driver_ledc esp_driver_spi esp_driver_i2c) + else() + list(APPEND req driver) endif() endif() @@ -101,6 +102,6 @@ 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 From 2a0514244f9c773f519f22501517c96fcfc0fdf4 Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Thu, 9 Oct 2025 13:30:27 +0300 Subject: [PATCH 2/5] Refactor CMakeLists.txt for dependency handling --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e8f85e576a..9fbf1f82e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,13 +89,13 @@ if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET ST list(APPEND srcs driver/sccb.c) endif() - set(req "") - if (idf_version VERSION_GREATER_EQUAL "6.0") - list(APPEND priv_requires esp_driver_gpio esp_driver_ledc esp_driver_spi esp_driver_i2c) - else() - list(APPEND req driver) - endif() +endif() +set(req "") +if (idf_version VERSION_GREATER_EQUAL "6.0") + list(APPEND priv_requires esp_driver_gpio esp_driver_ledc esp_driver_spi esp_driver_i2c) +else() + list(APPEND req driver) endif() idf_component_register( From bb0a2f5d499881d7f221dce7fb855378c7f95015 Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Thu, 9 Oct 2025 13:34:04 +0300 Subject: [PATCH 3/5] Update CMakeLists to require 'driver' component --- CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9fbf1f82e5..353980cef3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,11 +91,9 @@ if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET ST endif() -set(req "") +set(req driver) if (idf_version VERSION_GREATER_EQUAL "6.0") list(APPEND priv_requires esp_driver_gpio esp_driver_ledc esp_driver_spi esp_driver_i2c) -else() - list(APPEND req driver) endif() idf_component_register( From 8ca446372d21199484c7ff8dbda062d0bd48041e Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Thu, 9 Oct 2025 13:44:06 +0300 Subject: [PATCH 4/5] Modify priv_requires to use list append --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 353980cef3..2c648bff01 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 @@ -73,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) From 821df6d7ca462d6fd2d34da0c0213008b8e794a9 Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Thu, 9 Oct 2025 13:48:42 +0300 Subject: [PATCH 5/5] Remove esp_driver_ledc from private requirements --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c648bff01..53e29fb10e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -95,7 +95,8 @@ endif() set(req driver) if (idf_version VERSION_GREATER_EQUAL "6.0") - list(APPEND priv_requires esp_driver_gpio esp_driver_ledc esp_driver_spi esp_driver_i2c) + list(APPEND priv_requires esp_driver_gpio esp_driver_spi esp_driver_i2c) + list(APPEND req esp_driver_ledc) endif() idf_component_register(