Skip to content

Commit

Permalink
cmake: add the -Irimage #include path only for the modules that need it
Browse files Browse the repository at this point in the history
Fixes 177d9bd ("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 <[email protected]>
  • Loading branch information
marc-hb authored and lgirdwood committed Sep 17, 2021
1 parent fd1f631 commit bd01f6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions src/arch/xtensa/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bd01f6f

Please sign in to comment.