2024A-SW/managed_components/chmorgan__esp-audio-player/CMakeLists.txt
Joe Kearney 89166c8a02 Updated libraries (button and audio player) (#16)
This PR updates two dependency libraries to their latest versions:

## espressif/button: v3.5.0 to v4.1.5

[Version 4](https://components.espressif.com/components/espressif/button/versions/4.1.5/changelog?language=en) changed the API.  This code makes use of the new API, with no change to the existing behavior.

## chmorgan/esp-audio-player: v1.0.7 to v1.1.0

[Version 1.1.0](https://github.com/chmorgan/esp-audio-player/releases/tag/v1.1.0) introduces the possibility of multiple simultaneous audio streams.  This feature is as yet unused by KTag.

Co-authored-by: Joe Kearney <joe@clubk.club>
Reviewed-on: #16
2026-02-07 22:30:37 +00:00

33 lines
720 B
CMake

set(srcs
"audio_player.cpp"
"audio_mixer.cpp"
)
set(includes
"include"
)
set(requires)
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}"
)