forked from chmorgan/esp-audio-player
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
40 lines (31 loc) · 1.02 KB
/
Copy pathCMakeLists.txt
File metadata and controls
40 lines (31 loc) · 1.02 KB
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
36
37
38
39
40
set(srcs
"audio_player.cpp"
"audio_mixer.cpp"
"audio_stream_io.cpp"
"audio_http_stream.cpp"
)
set(includes
"include"
)
set(requires)
set(priv_requires esp_http_client)
message(STATUS "CONFIG_AUDIO_PLAYER_ENABLE_HTTP_STREAM=${CONFIG_AUDIO_PLAYER_ENABLE_HTTP_STREAM}")
message(STATUS "CONFIG_AUDIO_PLAYER_ENABLE_MP3=${CONFIG_AUDIO_PLAYER_ENABLE_MP3}")
if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "5.3")
list(APPEND requires esp_driver_i2s esp_ringbuf)
else()
list(APPEND requires driver)
endif()
if(CONFIG_AUDIO_PLAYER_ENABLE_MP3)
list(APPEND srcs "audio_mp3.cpp")
endif()
# TODO: move inside of the 'if(CONFIG_AUDIO_PLAYER_ENABLE_MP3)' when everything builds correctly
list(APPEND requires "esp-libhelix-mp3")
if(CONFIG_AUDIO_PLAYER_ENABLE_WAV)
list(APPEND srcs "audio_wav.cpp")
endif()
idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${includes}"
REQUIRES "${requires}"
PRIV_REQUIRES "${priv_requires}"
)