Skip to content

Commit

Permalink
zephyr/cmake: Clean up Waves codec integration
Browse files Browse the repository at this point in the history
Include the proprietary static library when not building the stub, do
a little reorganization of the cmake code to reduce duplication and
clarify things a bit.  Maybe.  CMake code doesn't clean up very well.

Signed-off-by: Andy Ross <andyross@google.com>
  • Loading branch information
andyross committed Feb 8, 2025
1 parent dceb9a6 commit 41430f7
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1141,17 +1141,21 @@ elseif(CONFIG_DTS_CODEC)
endif()
endif()

if(CONFIG_WAVES_CODEC STREQUAL "m")
add_subdirectory(${SOF_AUDIO_PATH}/module_adapter/module/waves/llext
${PROJECT_BINARY_DIR}/waves_llext)
add_dependencies(app waves)
elseif(CONFIG_WAVES_CODEC)
zephyr_library_sources(
${SOF_AUDIO_PATH}/module_adapter/module/waves/waves.c
)
zephyr_library_sources_ifdef(CONFIG_WAVES_CODEC_STUB
${SOF_AUDIO_PATH}/module_adapter/module/waves/maxx_stub.c
)
if(CONFIG_WAVES_CODEC)
set(WAVES_DIR ${SOF_AUDIO_PATH}/module_adapter/module/waves)
if(CONFIG_WAVES_CODEC STREQUAL "m")
add_subdirectory(${WAVES_DIR}/llext ${PROJECT_BINARY_DIR}/waves_llext)
add_dependencies(app waves)
else()
zephyr_library_sources(${WAVES_DIR}/waves.c)
if(CONFIG_WAVES_CODEC_STUB)
zephyr_library_sources_ifdef(CONFIG_WAVES_CODEC_STUB
${WAVES_DIR}/maxx_stub.c)
else()
zephyr_library_import(waves_codec
${sof_top_dir}/third_party/lib/libMaxxChrome.a)
endif()
endif()
endif()

if(CONFIG_PROBE STREQUAL "m")
Expand Down

0 comments on commit 41430f7

Please sign in to comment.