Skip to content

Commit a167dc9

Browse files
committed
cmake/zephyr: unify cmake rules for src/audio/dcblock
Adding all source files in a single, giant zephyr/CMakeLists.txt is inconvenient and does not scale. Modify Zephyr rules to use definitions in src/audio/dcblock instead Link: #8260 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1 parent ad82eaa commit a167dc9

File tree

3 files changed

+11
-19
lines changed

3 files changed

+11
-19
lines changed

src/audio/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD)
1717
if(CONFIG_COMP_ASRC)
1818
add_subdirectory(asrc)
1919
endif()
20+
if(CONFIG_COMP_DCBLOCK)
21+
add_subdirectory(dcblock)
22+
endif()
2023
if(CONFIG_COMP_FIR)
2124
add_subdirectory(eq_fir)
2225
endif()
@@ -56,9 +59,6 @@ if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD)
5659
${base_files}
5760
)
5861

59-
if(CONFIG_COMP_DCBLOCK)
60-
add_subdirectory(dcblock)
61-
endif()
6262
if(CONFIG_COMP_CROSSOVER)
6363
add_subdirectory(crossover)
6464
endif()

src/audio/dcblock/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
if(CONFIG_COMP_DCBLOCK STREQUAL "m")
2+
add_subdirectory(llext ${PROJECT_BINARY_DIR}/dcblock_llext)
3+
add_dependencies(app dcblock)
4+
return()
5+
endif()
6+
17
add_local_sources(sof dcblock.c)
28
add_local_sources(sof dcblock_generic.c)
39
add_local_sources(sof dcblock_hifi3.c)
410
add_local_sources(sof dcblock_hifi4.c)
511

612
if(CONFIG_IPC_MAJOR_3)
7-
add_local_sources(sof dcblock_ipc3.c)
13+
add_local_sources(sof dcblock_ipc3.c)
814
elseif(CONFIG_IPC_MAJOR_4)
9-
add_local_sources(sof dcblock_ipc4.c)
15+
add_local_sources(sof dcblock_ipc4.c)
1016
endif()

zephyr/CMakeLists.txt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -506,20 +506,6 @@ elseif(CONFIG_IPC_MAJOR_4)
506506
set(ipc_suffix ipc4)
507507
endif()
508508

509-
if(CONFIG_COMP_DCBLOCK STREQUAL "m")
510-
add_subdirectory(${SOF_AUDIO_PATH}/dcblock/llext
511-
${PROJECT_BINARY_DIR}/dcblock_llext)
512-
add_dependencies(app dcblock)
513-
elseif(CONFIG_COMP_DCBLOCK)
514-
zephyr_library_sources(
515-
${SOF_AUDIO_PATH}/dcblock/dcblock_generic.c
516-
${SOF_AUDIO_PATH}/dcblock/dcblock.c
517-
${SOF_AUDIO_PATH}/dcblock/dcblock_hifi3.c
518-
${SOF_AUDIO_PATH}/dcblock/dcblock_hifi4.c
519-
${SOF_AUDIO_PATH}/dcblock/dcblock_${ipc_suffix}.c
520-
)
521-
endif()
522-
523509
if(CONFIG_COMP_SEL STREQUAL "m")
524510
add_subdirectory(${SOF_AUDIO_PATH}/selector/llext
525511
${PROJECT_BINARY_DIR}/selector_llext)

0 commit comments

Comments
 (0)