Skip to content

Commit df652a0

Browse files
committed
Clean build and cmake files
1 parent fac3abc commit df652a0

File tree

3 files changed

+6
-22
lines changed

3 files changed

+6
-22
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ The API is stable, but it might change without previous anounce.
77
To build the project, follow the following instructions:
88
- [ESP-IDF](https://docs.espressif.com/projects/esp-idf/en/v5.2.2/esp32/get-started/index.html): I used version 5.2.2, but it might work with other versions.
99
- Clone the micropython repo and this repo in a folder, e.g. "MyESPCam". I used the actual micropython master branch (between v1.23 and before 1.24).
10-
- You will have to add the ESP32-Camera driver (I used v2.0.11). Here are 3 posibilities:
11-
Clone the https://github.com/espressif/esp32-camera repository inside the ~/esp-idf/components folder, or
10+
- You will have to add the ESP32-Camera driver (I used v2.0.11). Here are 2 posibilities:
1211
Add a dependency on espressif/esp32-camera component (idf.py add-dependency "espressif/esp32-camera"), or
1312
Manually add a dependency in idf_component.yml of your respective port in the local micropython port folder.
1413

src/micropython.cmake

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,10 @@
1-
# Create an INTERFACE library for our C module.
2-
add_library(usermod_esp32camera INTERFACE)
3-
4-
# Add our source files to the lib
5-
target_sources(usermod_esp32camera INTERFACE
1+
add_library(usermod_mp_camera INTERFACE)
2+
target_sources(usermod_mp_camera INTERFACE
63
${CMAKE_CURRENT_LIST_DIR}/modcamera.c
74
${CMAKE_CURRENT_LIST_DIR}/modcamera_api.c
85
)
9-
10-
# Add the current directory as an include directory.
11-
target_include_directories(usermod_esp32camera INTERFACE
6+
target_include_directories(usermod_mp_camera INTERFACE
127
${CMAKE_CURRENT_LIST_DIR}
13-
${IDF_PATH}/components/esp32-camera/driver/include
14-
${IDF_PATH}/components/esp32-camera/driver/private_include
15-
${IDF_PATH}/components/esp32-camera/conversions/include
16-
${IDF_PATH}/components/esp32-camera/conversions/private_include
17-
${IDF_PATH}/components/esp32-camera/sensors/private_include
188
)
19-
20-
target_compile_definitions(usermod_esp32camera INTERFACE)
21-
22-
# Link our INTERFACE library to the usermod target.
23-
target_link_libraries(usermod INTERFACE usermod_esp32camera)
9+
target_compile_definitions(usermod_mp_camera INTERFACE)
10+
target_link_libraries(usermod INTERFACE usermod_mp_camera)

src/micropython.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
CAMERA_MOD_DIR := $(USERMOD_DIR)
22
SRC_USERMOD_C += $(addprefix $(CAMERA_MOD_DIR)/, modcamera_api.c)
33
SRC_USERMOD_LIB_C += $(addprefix $(CAMERA_MOD_DIR)/, modcamera.c)
4-
CFLAGS_USERMOD += -I$(CAMERA_MOD_DIR) -DMODULE_CAMERA_ENABLED=1
5-

0 commit comments

Comments
 (0)