Skip to content

Commit 41430f7

Browse files
committed
zephyr/cmake: Clean up Waves codec integration
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>
1 parent dceb9a6 commit 41430f7

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

zephyr/CMakeLists.txt

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,17 +1141,21 @@ elseif(CONFIG_DTS_CODEC)
11411141
endif()
11421142
endif()
11431143

1144-
if(CONFIG_WAVES_CODEC STREQUAL "m")
1145-
add_subdirectory(${SOF_AUDIO_PATH}/module_adapter/module/waves/llext
1146-
${PROJECT_BINARY_DIR}/waves_llext)
1147-
add_dependencies(app waves)
1148-
elseif(CONFIG_WAVES_CODEC)
1149-
zephyr_library_sources(
1150-
${SOF_AUDIO_PATH}/module_adapter/module/waves/waves.c
1151-
)
1152-
zephyr_library_sources_ifdef(CONFIG_WAVES_CODEC_STUB
1153-
${SOF_AUDIO_PATH}/module_adapter/module/waves/maxx_stub.c
1154-
)
1144+
if(CONFIG_WAVES_CODEC)
1145+
set(WAVES_DIR ${SOF_AUDIO_PATH}/module_adapter/module/waves)
1146+
if(CONFIG_WAVES_CODEC STREQUAL "m")
1147+
add_subdirectory(${WAVES_DIR}/llext ${PROJECT_BINARY_DIR}/waves_llext)
1148+
add_dependencies(app waves)
1149+
else()
1150+
zephyr_library_sources(${WAVES_DIR}/waves.c)
1151+
if(CONFIG_WAVES_CODEC_STUB)
1152+
zephyr_library_sources_ifdef(CONFIG_WAVES_CODEC_STUB
1153+
${WAVES_DIR}/maxx_stub.c)
1154+
else()
1155+
zephyr_library_import(waves_codec
1156+
${sof_top_dir}/third_party/lib/libMaxxChrome.a)
1157+
endif()
1158+
endif()
11551159
endif()
11561160

11571161
if(CONFIG_PROBE STREQUAL "m")

0 commit comments

Comments
 (0)