Skip to content

Commit 5c0a60c

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

2 files changed

Lines changed: 6 additions & 12 deletions

File tree

src/library_manager/CMakeLists.txt

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

33
if(CONFIG_LIBRARY_MANAGER)
4-
add_local_sources(sof lib_manager.c, lib_notifications.c)
4+
add_local_sources(sof lib_manager.c lib_notification.c)
5+
6+
if (CONFIG_MM_DRV AND CONFIG_LLEXT)
7+
add_local_sources(sof llext_manager.c)
8+
endif()
59
endif()

zephyr/CMakeLists.txt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ add_subdirectory(../src/debug/ debug_unused_install/)
209209
add_subdirectory(../src/init/ init_unused_install/)
210210
add_subdirectory(../src/ipc/ ipc_unused_install/)
211211
add_subdirectory(../src/lib/ lib_unused_install/)
212+
add_subdirectory(../src/library_manager/ library_manager_unused_install/)
212213
add_subdirectory(../src/schedule/ schedule_unused_install/)
213214
add_subdirectory(test/)
214215

@@ -496,17 +497,6 @@ zephyr_library_sources_ifdef(CONFIG_SAMPLE_KEYPHRASE
496497
${SOF_SAMPLES_PATH}/audio/detect_test.c
497498
)
498499

499-
zephyr_library_sources_ifdef(CONFIG_LIBRARY_MANAGER
500-
${SOF_SRC_PATH}/library_manager/lib_manager.c
501-
${SOF_SRC_PATH}/library_manager/lib_notification.c
502-
)
503-
504-
if (CONFIG_MM_DRV AND CONFIG_LLEXT)
505-
zephyr_library_sources_ifdef(CONFIG_LIBRARY_MANAGER
506-
${SOF_SRC_PATH}/library_manager/llext_manager.c
507-
)
508-
endif()
509-
510500
if(CONFIG_SAMPLE_SMART_AMP STREQUAL "m")
511501
add_subdirectory(${SOF_SAMPLES_PATH}/audio/smart_amp_test_llext
512502
${PROJECT_BINARY_DIR}/smart_amp_test_llext)

0 commit comments

Comments
 (0)