Skip to content

Commit

Permalink
cmake: Link TGL Google hotword library
Browse files Browse the repository at this point in the history
libc and libm are provided by the xcc toolchain.
They are not available from the gcc toolchain.
To build with gcc, libc and libm should be provided
under third_party_libraries.

Signed-off-by: Ben Zhang <[email protected]>
  • Loading branch information
bzhg authored and lgirdwood committed Jun 11, 2021
1 parent 2b0ac19 commit 91467d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ install(
add_library(sof_ld_flags INTERFACE)
add_library(sof_ld_scripts INTERFACE)

target_include_directories(sof_public_headers INTERFACE ${PROJECT_SOURCE_DIR}/third_party_include)
link_directories(${PROJECT_SOURCE_DIR}/third_party_libraries)

# declare target with no sources to let cmake know about it
add_executable(sof "")
target_link_libraries(sof PRIVATE sof_options)
Expand Down
3 changes: 3 additions & 0 deletions src/audio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ if(NOT CONFIG_LIBRARY)
add_local_sources(sof
google_hotword_detect.c
)
target_link_libraries(sof PRIVATE libhifi3_google_hotword_dsp_api.a)
target_link_libraries(sof PRIVATE c)
target_link_libraries(sof PRIVATE m)
endif()
if(CONFIG_COMP_SEL)
add_subdirectory(selector)
Expand Down

0 comments on commit 91467d0

Please sign in to comment.