cmake: add the -Irimage #include path only for the modules that need it

Fixes 177d9bd073 ("cmake: defer the rimage build until it's actually
needed.") that corrected the rimage dependency but forgot about the
include.

This allows building the testbench without fetching rimage.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
Marc Herbert 2021-09-17 05:35:21 +00:00 committed by Liam Girdwood
parent fd1f631352
commit bd01f6fad4
2 changed files with 5 additions and 1 deletions

View File

@ -57,7 +57,6 @@ set(CMAKE_ASM_FLAGS -DASSEMBLY)
add_library(sof_public_headers INTERFACE)
target_include_directories(sof_public_headers INTERFACE ${PROJECT_SOURCE_DIR}/src/include)
target_include_directories(sof_public_headers INTERFACE ${PROJECT_SOURCE_DIR}/rimage/src/include)
# interface library that is used only as container for sof binary options
# other targets can use it to build with the same options

View File

@ -263,6 +263,11 @@ if(build_bootloader)
add_dependencies(boot_module rimage_ep)
add_dependencies(base_module rimage_ep)
target_include_directories(bootloader PRIVATE ${PROJECT_SOURCE_DIR}/rimage/src/include)
target_include_directories(boot_module PRIVATE ${PROJECT_SOURCE_DIR}/rimage/src/include)
target_include_directories(base_module PRIVATE ${PROJECT_SOURCE_DIR}/rimage/src/include)
target_link_libraries(bootloader PRIVATE sof_options)
add_local_sources(bootloader xtos/_vectors.S ${PROJECT_SOURCE_DIR}/src/platform/${family_path}/boot_entry.S ${PROJECT_SOURCE_DIR}/src/platform/${family_path}/boot_loader.c)
target_link_libraries(bootloader PRIVATE reset)