Skip to content

Commit ff97a17

Browse files
committed
cmake/zephyr: unify cmake rules for src/audio/selector
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/selector instead Link: #8260 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1 parent a167dc9 commit ff97a17

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

src/audio/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD)
2626
if(CONFIG_COMP_IIR)
2727
add_subdirectory(eq_iir)
2828
endif()
29+
if(CONFIG_COMP_SEL)
30+
add_subdirectory(selector)
31+
endif()
2932
if(CONFIG_COMP_SRC)
3033
add_subdirectory(src)
3134
endif()
@@ -95,9 +98,6 @@ if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD)
9598
kpb.c
9699
)
97100
endif()
98-
if(CONFIG_COMP_SEL)
99-
add_subdirectory(selector)
100-
endif()
101101
if(CONFIG_COMP_SMART_AMP)
102102
add_subdirectory(smart_amp)
103103
endif()

src/audio/selector/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22

3+
if(CONFIG_COMP_SEL STREQUAL "m")
4+
add_subdirectory(llext ${PROJECT_BINARY_DIR}/selector_llext)
5+
add_dependencies(app selector)
6+
return()
7+
endif()
8+
39
add_local_sources(sof selector_generic.c selector.c)

zephyr/CMakeLists.txt

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

509-
if(CONFIG_COMP_SEL STREQUAL "m")
510-
add_subdirectory(${SOF_AUDIO_PATH}/selector/llext
511-
${PROJECT_BINARY_DIR}/selector_llext)
512-
add_dependencies(app selector)
513-
elseif(CONFIG_COMP_SEL)
514-
zephyr_library_sources(
515-
${SOF_AUDIO_PATH}/selector/selector_generic.c
516-
${SOF_AUDIO_PATH}/selector/selector.c
517-
)
518-
endif()
519-
520509
zephyr_library_sources_ifdef(CONFIG_COMP_KPB
521510
${SOF_AUDIO_PATH}/kpb.c
522511
)

0 commit comments

Comments
 (0)