cmake: Pass path list in a Windows friendly way

When invoking cmake/llext-edk.cmake, CMakeLists.txt was sending the list
of includes as a colon separated list. On Windows, this list was
actually a single item, so it wasn't being parsed properly.

This patch sends the list as a cmake list and uses separate_arguments()
on the receiving side to fix it.

Fixes #73069

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
This commit is contained in:
Ederson de Souza 2024-05-23 16:38:24 -07:00 committed by Anas Nashif
commit a7ac049406
2 changed files with 2 additions and 2 deletions

View file

@ -2139,7 +2139,7 @@ add_custom_command(
COMMAND ${CMAKE_COMMAND}
-DPROJECT_BINARY_DIR=${PROJECT_BINARY_DIR}
-DAPPLICATION_SOURCE_DIR=${APPLICATION_SOURCE_DIR}
-DINTERFACE_INCLUDE_DIRECTORIES="$<JOIN:$<TARGET_PROPERTY:zephyr_interface,INTERFACE_INCLUDE_DIRECTORIES>,:>"
-DINTERFACE_INCLUDE_DIRECTORIES="$<TARGET_PROPERTY:zephyr_interface,INTERFACE_INCLUDE_DIRECTORIES>"
-Dllext_edk_file=${llext_edk_file}
-DAUTOCONF_H=${AUTOCONF_H}
-Dllext_cflags="${llext_edk_cflags}"

View file

@ -119,7 +119,6 @@ foreach(flag ${llext_cflags})
endforeach()
set(llext_cflags ${new_cflags})
cmake_path(CONVERT "${INTERFACE_INCLUDE_DIRECTORIES}" TO_CMAKE_PATH_LIST include_dirs)
set(autoconf_h_edk ${llext_edk_inc}/${AUTOCONF_H})
cmake_path(RELATIVE_PATH AUTOCONF_H BASE_DIRECTORY ${PROJECT_BINARY_DIR} OUTPUT_VARIABLE autoconf_h_rel)
@ -127,6 +126,7 @@ cmake_path(RELATIVE_PATH AUTOCONF_H BASE_DIRECTORY ${PROJECT_BINARY_DIR} OUTPUT_
list(APPEND base_flags_make ${llext_cflags} ${imacros_make})
list(APPEND base_flags_cmake ${llext_cflags} ${imacros_cmake})
separate_arguments(include_dirs NATIVE_COMMAND ${INTERFACE_INCLUDE_DIRECTORIES})
file(MAKE_DIRECTORY ${llext_edk_inc})
foreach(dir ${include_dirs})
if (NOT EXISTS ${dir})