Skip to content

Commit

Permalink
[esp32] Add libpeer to component registry
Browse files Browse the repository at this point in the history
  • Loading branch information
sepfy committed Aug 25, 2024
1 parent 78b8b80 commit e78e8cf
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 27 deletions.
17 changes: 15 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
cmake_minimum_required(VERSION 3.1)

include(${CMAKE_CURRENT_LIST_DIR}/third_party/coreHTTP/httpFilePaths.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/third_party/coreMQTT/mqttFilePaths.cmake)

if (DEFINED ENV{IDF_PATH})
file(GLOB ESP32_CODES "./src/*.c")
idf_component_register(
SRCS ${ESP32_CODES} ${HTTP_SOURCES} ${MQTT_SOURCES} ${MQTT_SERIALIZER_SOURCES}
INCLUDE_DIRS "./src" ${HTTP_INCLUDE_PUBLIC_DIRS} ${MQTT_INCLUDE_PUBLIC_DIRS}
REQUIRES mbedtls srtp json esp_netif
)
add_definitions("-DESP32 -DHTTP_DO_NOT_USE_CUSTOM_CONFIG -DMQTT_DO_NOT_USE_CUSTOM_CONFIG")
return()
endif()

project(peer)

option(ENABLE_TESTS "Enable tests" OFF)
option(BUILD_SHARED_LIBS "Build shared libraries" ON)

include(ExternalProject)
include(third_party/coreHTTP/httpFilePaths.cmake)
include(third_party/coreMQTT/mqttFilePaths.cmake)

include_directories(${CMAKE_BINARY_DIR}/dist/include ${CMAKE_BINARY_DIR}/dist/include/cjson)

Expand Down
3 changes: 1 addition & 2 deletions examples/esp32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ $ source export.sh

### Download Required Libraries
```bash
$ git clone --recursive https://github.com/sepfy/libpeer
$ git clone https://github.com/sepfy/libpeer
$ cd libpeer/examples/esp32
$ git clone --recursive https://github.com/sepfy/esp_ports.git components/srtp
```

### Configure Your Build
Expand Down
23 changes: 0 additions & 23 deletions examples/esp32/components/peer/CMakeLists.txt

This file was deleted.

1 change: 1 addition & 0 deletions examples/esp32/main/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## IDF Component Manager Manifest File
dependencies:
sepfy/libpeer: ">=0.0.2"
espressif/esp_audio_codec: "^2.0.0"
espressif/esp32-camera: "^2.0.4"
protocol_examples_common:
Expand Down
6 changes: 6 additions & 0 deletions idf_component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
sepfy/srtp: ^2.0.4
description: libpeer
license: MIT
url: https://github.com/sepfy/libpeer
version: 0.0.2

0 comments on commit e78e8cf

Please sign in to comment.