Skip to content

Commit 1f030d9

Browse files
authored
Add esp32 camera dir (#23)
minor change that allows to override the directories where the includes exist for the esp32-camera component. It should function the same as before, if you do not provide an override. --------- Signed-off-by: John Gentilin <[email protected]>
1 parent c979972 commit 1f030d9

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

src/micropython.cmake

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,20 @@ target_sources(usermod_mp_camera INTERFACE
88
${CMAKE_CURRENT_LIST_DIR}/modcamera_api.c
99
)
1010

11-
if(EXISTS "${IDF_PATH}/components/esp32-camera")
11+
if(NOT ESP32_CAMERA_DIR)
12+
set(ESP32_CAMERA_DIR "${IDF_PATH}/components/esp32-camera")
13+
endif()
14+
15+
message("Camera Dir: ${ESP32_CAMERA_DIR}")
16+
17+
if(EXISTS "${ESP32_CAMERA_DIR}")
1218
target_include_directories(usermod_mp_camera INTERFACE
1319
${CMAKE_CURRENT_LIST_DIR}
14-
${IDF_PATH}/components/esp32-camera/driver/include
15-
${IDF_PATH}/components/esp32-camera/driver/private_include
16-
${IDF_PATH}/components/esp32-camera/conversions/include
17-
${IDF_PATH}/components/esp32-camera/conversions/private_include
18-
${IDF_PATH}/components/esp32-camera/sensors/private_include
20+
${ESP32_CAMERA_DIR}/driver/include
21+
${ESP32_CAMERA_DIR}/driver/private_include
22+
${ESP32_CAMERA_DIR}/conversions/include
23+
${ESP32_CAMERA_DIR}/conversions/private_include
24+
${ESP32_CAMERA_DIR}/sensors/private_include
1925
)
2026
else()
2127
target_include_directories(usermod_mp_camera INTERFACE
@@ -32,4 +38,4 @@ endif()
3238

3339
target_link_libraries(usermod INTERFACE usermod_mp_camera)
3440

35-
micropy_gather_target_properties(usermod_mp_camera)
41+
micropy_gather_target_properties(usermod_mp_camera)

0 commit comments

Comments
 (0)