Skip to content

Commit cfb5f83

Browse files
committed
fix: Fix requires by IDF6
1 parent dfeaa71 commit cfb5f83

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,11 @@ if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET ST
9191
list(APPEND srcs driver/sccb.c)
9292
endif()
9393

94-
if (idf_version VERSION_GREATER_EQUAL "6.0")
95-
list(APPEND priv_requires esp_driver_gpio)
94+
set(requires "")
95+
if (idf_version VERSION_GREATER_EQUAL "5.3")
96+
list(APPEND priv_requires esp_driver_gpio esp_driver_ledc esp_driver_spi esp_driver_i2c)
97+
else()
98+
list(APPEND requires driver)
9699
endif()
97100

98101
endif()
@@ -101,6 +104,6 @@ idf_component_register(
101104
SRCS ${srcs}
102105
INCLUDE_DIRS ${include_dirs}
103106
PRIV_INCLUDE_DIRS ${priv_include_dirs}
104-
REQUIRES driver # due to include of driver/gpio.h in esp_camera.h
107+
REQUIRES ${requires}
105108
PRIV_REQUIRES ${priv_requires}
106109
)

idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ repository: https://github.com/espressif/esp32-camera.git
66
dependencies:
77
idf: ">=5.1"
88
esp_jpeg:
9-
version: "^1.3.0"
9+
version: "^1.3.1"
1010
public: true

0 commit comments

Comments
 (0)