cmake: Don't translate from relative to absolute include paths

Don't translate from relative to absolute include paths.

It is lost to history why this was necessary and it is causing
problems with generator expressions so we remove the logic.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit is contained in:
Sebastian Bøe 2022-01-29 13:22:48 +01:00 committed by Carles Cufí
parent 6e6009ea55
commit ac65420121

View file

@ -87,26 +87,12 @@ endfunction()
# https://cmake.org/cmake/help/latest/command/target_include_directories.html
function(zephyr_include_directories)
foreach(arg ${ARGV})
if(IS_ABSOLUTE ${arg})
set(path ${arg})
else()
set(path ${CMAKE_CURRENT_SOURCE_DIR}/${arg})
endif()
target_include_directories(zephyr_interface INTERFACE ${path})
endforeach()
target_include_directories(zephyr_interface INTERFACE ${ARGV})
endfunction()
# https://cmake.org/cmake/help/latest/command/target_include_directories.html
function(zephyr_system_include_directories)
foreach(arg ${ARGV})
if(IS_ABSOLUTE ${arg})
set(path ${arg})
else()
set(path ${CMAKE_CURRENT_SOURCE_DIR}/${arg})
endif()
target_include_directories(zephyr_interface SYSTEM INTERFACE ${path})
endforeach()
target_include_directories(zephyr_interface SYSTEM INTERFACE ${ARGV})
endfunction()
# https://cmake.org/cmake/help/latest/command/target_compile_definitions.html