-
Notifications
You must be signed in to change notification settings - Fork 705
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'bugfix/cmake_for_custom_audio_board' into 'master'
Bugfix/cmake for custom audio board See merge request adf/esp-adf-internal!432
- Loading branch information
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
examples/get-started/play_mp3/components/my_board/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Edit following two lines to set component requirements (see docs) | ||
set(COMPONENT_REQUIRES) | ||
set(COMPONENT_PRIV_REQUIRES audio_sal audio_hal esp_dispatcher esp_peripherals display_service) | ||
|
||
if(CONFIG_AUDIO_BOARD_CUSTOM) | ||
message(STATUS "Current board name is " CONFIG_AUDIO_BOARD_CUSTOM) | ||
list(APPEND COMPONENT_ADD_INCLUDEDIRS ./my_board_v1_0 ./my_codec_driver) | ||
set(COMPONENT_SRCS | ||
./my_board_v1_0/board.c | ||
./my_board_v1_0/board_pins_config.c | ||
./my_codec_driver/new_codec.c | ||
) | ||
endif() | ||
|
||
register_component() | ||
|
||
IF (IDF_VER MATCHES "v4.") | ||
idf_component_get_property(audio_board_lib audio_board COMPONENT_LIB) | ||
set_property(TARGET ${audio_board_lib} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${COMPONENT_LIB}) | ||
|
||
ELSEIF (IDF_VER MATCHES "v3.") | ||
set_property(TARGET idf_component_audio_board APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES $<TARGET_PROPERTY:${COMPONENT_TARGET},INTERFACE_INCLUDE_DIRECTORIES>) | ||
|
||
ENDIF (IDF_VER MATCHES "v4.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters