Skip to content

Commit 0951c63

Browse files
committed
Use KVS_SDK_PATH to set path to the Amazon KVS webrtc SDK
- The env variable then used by all the example to use the required components
1 parent 7c635ef commit 0951c63

File tree

9 files changed

+39
-31
lines changed

9 files changed

+39
-31
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Set KVS_SDK_PATH if not already set in environment
2+
if(NOT DEFINED ENV{KVS_SDK_PATH})
3+
get_filename_component(KVS_SDK_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../.." ABSOLUTE)
4+
message(WARNING "KVS_SDK_PATH not set in environment. Setting to ${KVS_SDK_PATH}")
5+
set(ENV{KVS_SDK_PATH} "${KVS_SDK_PATH}")
6+
endif()

esp_port/examples/network_adapter/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# in this exact order for cmake to work correctly
33
cmake_minimum_required(VERSION 3.5)
44

5+
# Include common KVS SDK path setting
6+
include(${CMAKE_CURRENT_SOURCE_DIR}/../app_common/set_kvs_sdk_path.cmake)
7+
58
set(PROJECT_VERSION_MAJOR_1 "0")
69
set(PROJECT_VERSION_MAJOR_2 "0")
710
set(PROJECT_VERSION_MINOR "6")

esp_port/examples/network_adapter/main/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ dependencies:
33
# local components
44
network_coprocessor:
55
version: "*"
6-
path: ../../../components/network_coprocessor
6+
path: ${KVS_SDK_PATH}/esp_port/components/network_coprocessor
77
rules:
88
- if: "target in [esp32c6]"

esp_port/examples/signaling_only/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# CMakeLists in this exact order for cmake to work correctly
33
cmake_minimum_required(VERSION 3.5)
44

5+
# Include common KVS SDK path setting
6+
include(${CMAKE_CURRENT_SOURCE_DIR}/../app_common/set_kvs_sdk_path.cmake)
7+
58
# Enable signaling only mode
69
option(ENABLE_SIGNALLING_ONLY "enable only the signalling component" ON)
710
option(ENABLE_STREAMING_ONLY "enable only the streaming component" OFF)

esp_port/examples/signaling_only/main/idf_component.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@ dependencies:
33

44
network_coprocessor:
55
version: "*"
6-
path: ../../../components/network_coprocessor
6+
path: ${KVS_SDK_PATH}/esp_port/components/network_coprocessor
77
rules:
88
- if: "target in [esp32c6]"
99

1010
esp_webrtc_utils:
11-
path: ../../../components/esp_webrtc_utils
11+
path: ${KVS_SDK_PATH}/esp_port/components/esp_webrtc_utils
1212
version: "*"
1313

1414
kvs_webrtc:
15-
path: ../../../components/kvs_webrtc
15+
path: ${KVS_SDK_PATH}/esp_port/components/kvs_webrtc
1616
version: "*"
1717

1818
signaling_serializer:
19-
path: ../../../components/signaling_serializer
19+
path: ${KVS_SDK_PATH}/esp_port/components/signaling_serializer
2020
version: "*"
2121

2222
webrtc_bridge:
23-
path: ../../../components/webrtc_bridge
23+
path: ${KVS_SDK_PATH}/esp_port/components/webrtc_bridge
2424
version: "*"
2525

2626
app_common:
27-
path: ../../app_common
27+
path: ${KVS_SDK_PATH}/esp_port/examples/app_common
2828
version: "*"

esp_port/examples/streaming_only/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# CMakeLists in this exact order for cmake to work correctly
33
cmake_minimum_required(VERSION 3.5)
44

5+
# Include common KVS SDK path setting
6+
include(${CMAKE_CURRENT_SOURCE_DIR}/../app_common/set_kvs_sdk_path.cmake)
7+
58
option(ENABLE_STREAMING_ONLY "enable only the streaming" ON)
69
option(ENABLE_DATA_CHANNEL "enable data channel support" ON)
710
option(ENABLE_SIGNALLING_ONLY "enable only the streaming" OFF)

esp_port/examples/streaming_only/main/idf_component.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,37 @@
22
dependencies:
33
# local components
44
espressif/esp_hosted:
5-
override_path: ../../../components/esp_hosted
5+
override_path: ${KVS_SDK_PATH}/esp_port/components/esp_hosted
66
version: '*'
77
rules:
88
- if: target in [esp32p4]
99

1010
espressif/esp_wifi_remote:
11-
override_path: ../../../components/esp_hosted
11+
override_path: ${KVS_SDK_PATH}/esp_port/components/esp_wifi_remote
1212
version: '*'
1313
rules:
1414
- if: target in [esp32p4]
1515

1616
esp_webrtc_utils:
17-
path: ../../../components/esp_webrtc_utils
17+
path: ${KVS_SDK_PATH}/esp_port/components/esp_webrtc_utils
1818
version: '*'
1919

2020
kvs_webrtc:
21-
path: ../../../components/kvs_webrtc
21+
path: ${KVS_SDK_PATH}/esp_port/components/kvs_webrtc
2222
version: '*'
2323

2424
media_stream:
25-
path: ../../../components/media_stream
25+
path: ${KVS_SDK_PATH}/esp_port/components/media_stream
2626
version: '*'
2727

28-
espressif/esp_video:
29-
version: '*'
30-
rules:
31-
- if: target in [esp32p4]
32-
3328
signaling_serializer:
34-
path: ../../../components/signaling_serializer
29+
path: ${KVS_SDK_PATH}/esp_port/components/signaling_serializer
3530
version: '*'
3631

3732
webrtc_bridge:
38-
path: ../../../components/webrtc_bridge
33+
path: ${KVS_SDK_PATH}/esp_port/components/webrtc_bridge
3934
version: '*'
4035

4136
app_common:
42-
path: ../../app_common
37+
path: ${KVS_SDK_PATH}/esp_port/examples/app_common
4338
version: '*'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
cmake_minimum_required(VERSION 3.5)
22

3+
# Include common KVS SDK path setting
4+
include(${CMAKE_CURRENT_SOURCE_DIR}/../app_common/set_kvs_sdk_path.cmake)
5+
36
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
47
project(webrtc_classic)
58
option(ENABLE_DATA_CHANNEL "Enable data_channel support" ON)

esp_port/examples/webrtc_classic/main/idf_component.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,29 @@
22
dependencies:
33
# local components
44
espressif/esp_hosted:
5-
override_path: ../../../components/esp_hosted
5+
override_path: ${KVS_SDK_PATH}/esp_port/components/esp_hosted
66
version: "*"
77
rules:
88
- if: "target in [esp32p4]"
99

1010
espressif/esp_wifi_remote:
11-
override_path: ../../../components/esp_wifi_remote
11+
override_path: ${KVS_SDK_PATH}/esp_port/components/esp_wifi_remote
1212
version: "*"
1313
rules:
1414
- if: "target in [esp32p4]"
1515

1616
esp_webrtc_utils:
17-
path: ../../../components/esp_webrtc_utils
17+
path: ${KVS_SDK_PATH}/esp_port/components/esp_webrtc_utils
1818
version: "*"
1919

2020
kvs_webrtc:
21-
path: ../../../components/kvs_webrtc
21+
path: ${KVS_SDK_PATH}/esp_port/components/kvs_webrtc
2222
version: "*"
2323

2424
media_stream:
25-
path: ../../../components/media_stream
25+
path: ${KVS_SDK_PATH}/esp_port/components/media_stream
2626
version: "*"
2727

28-
espressif/esp_video:
29-
version: "*"
30-
rules:
31-
- if: "target in [esp32p4]"
32-
3328
app_common:
34-
path: ../../app_common
29+
path: ${KVS_SDK_PATH}/esp_port/examples/app_common
3530
version: "*"

0 commit comments

Comments
 (0)