From 91467d092433bed93f798ea1030346b3ff19944f Mon Sep 17 00:00:00 2001 From: Ben Zhang Date: Tue, 14 Jul 2020 12:46:27 -0400 Subject: [PATCH] cmake: Link TGL Google hotword library 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 --- CMakeLists.txt | 3 +++ src/audio/CMakeLists.txt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a7ea78d179cb..53e5c46c0540 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/src/audio/CMakeLists.txt b/src/audio/CMakeLists.txt index 1310ca18fd92..5b3fd261139b 100644 --- a/src/audio/CMakeLists.txt +++ b/src/audio/CMakeLists.txt @@ -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)