forked from openai/openai-realtime-embedded-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
35 lines (27 loc) · 1.23 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
cmake_minimum_required(VERSION 3.19)
# Audio Sending is implemented, but not performant enough yet
add_compile_definitions(SEND_AUDIO=0)
if(NOT IDF_TARGET STREQUAL linux)
if(NOT DEFINED ENV{WIFI_SSID} OR NOT DEFINED ENV{WIFI_PASSWORD})
message(FATAL_ERROR "Env variables WIFI_SSID and WIFI_PASSWORD must be set")
endif()
add_compile_definitions(WIFI_SSID="$ENV{WIFI_SSID}")
add_compile_definitions(WIFI_PASSWORD="$ENV{WIFI_PASSWORD}")
endif()
if(NOT DEFINED ENV{OPENAI_API_KEY})
message(FATAL_ERROR "Env variable OPENAI_API_KEY must be set")
endif()
add_compile_definitions(OPENAI_API_KEY="$ENV{OPENAI_API_KEY}")
add_compile_definitions(OPENAI_REALTIMEAPI="https://api.openai.com/v1/realtime?model=gpt-4o-mini-realtime-preview-2024-12-17")
set(COMPONENTS src)
set(EXTRA_COMPONENT_DIRS "src" "components/srtp" "components/peer" "components/esp-libopus")
if(IDF_TARGET STREQUAL linux)
add_compile_definitions(LINUX_BUILD=1)
list(APPEND EXTRA_COMPONENT_DIRS
$ENV{IDF_PATH}/examples/protocols/linux_stubs/esp_stubs
"components/esp-protocols/common_components/linux_compat/esp_timer"
"components/esp-protocols/common_components/linux_compat/freertos"
)
endif()
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(src)