From a7ac0494062628670a1c712003e2295004fe7844 Mon Sep 17 00:00:00 2001 From: Ederson de Souza Date: Thu, 23 May 2024 16:38:24 -0700 Subject: [PATCH] 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 --- CMakeLists.txt | 2 +- cmake/llext-edk.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0afc945667b..e326f123646 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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="$,:>" + -DINTERFACE_INCLUDE_DIRECTORIES="$" -Dllext_edk_file=${llext_edk_file} -DAUTOCONF_H=${AUTOCONF_H} -Dllext_cflags="${llext_edk_cflags}" diff --git a/cmake/llext-edk.cmake b/cmake/llext-edk.cmake index d68e6939e69..91b4b0ef9ac 100644 --- a/cmake/llext-edk.cmake +++ b/cmake/llext-edk.cmake @@ -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})