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:
parent
6e6009ea55
commit
ac65420121
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue