Skip to content

Commit

Permalink
smart-amp: add a UUID file creation
Browse files Browse the repository at this point in the history
When installing modular components we need to create UUID-based soft
links. Create a separate file with a list of UUIDs to assist in that.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
  • Loading branch information
lyakh committed Apr 9, 2024
1 parent fb6286d commit d51e571
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/samples/audio/smart_amp_llext/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
set(MODULE "smart_amp_test")
cmake_path(SET SOF_BASE NORMALIZE ${PROJECT_SOURCE_DIR}/../../../..)

file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/../${MODULE}.toml uuids REGEX "^[ \t]*uuid *=")

file(WRITE ${PROJECT_BINARY_DIR}/llext.uuid "")

foreach(line IN LISTS uuids)
string(REGEX REPLACE "^[ \t]*uuid *= \"([0-9A-F\-]*)\"" "\\1" uuid ${line})
file(APPEND ${PROJECT_BINARY_DIR}/llext.uuid "${uuid}\n")
endforeach()

add_library(${MODULE} SHARED)

target_sources(${MODULE} PRIVATE
Expand Down

0 comments on commit d51e571

Please sign in to comment.