diff --git a/tools/cmake/idf_functions.cmake b/tools/cmake/idf_functions.cmake index 5ed4f3f88..923478231 100644 --- a/tools/cmake/idf_functions.cmake +++ b/tools/cmake/idf_functions.cmake @@ -18,8 +18,7 @@ macro(idf_set_global_variables) # (cmake calls this CMAKE_SOURCE_DIR, keeping old name for compatibility.) set(PROJECT_PATH "${CMAKE_SOURCE_DIR}") - # Note: "main" is no longer a component... - # + # Note: Unlike older build system, "main" is no longer a component. See build docs for details. set_default(COMPONENT_DIRS "${PROJECT_PATH}/components ${EXTRA_COMPONENT_DIRS} ${IDF_PATH}/components") spaces2list(COMPONENT_DIRS) diff --git a/tools/cmake/project.cmake b/tools/cmake/project.cmake index ef5f6740d..b9fe126b9 100644 --- a/tools/cmake/project.cmake +++ b/tools/cmake/project.cmake @@ -7,9 +7,10 @@ set(IDF_PATH "$ENV{IDF_PATH}") if(NOT IDF_PATH) # Documentation says you should set IDF_PATH in your environment, but we # can infer it here if it's not set. - set(IDF_PATH ${CMAKE_CURRENT_LIST_DIR}) - set($ENV{IDF_PATH} "${IDF_PATH}") + set(IDF_PATH ${CMAKE_CURRENT_LIST_DIR}) endif() +file(TO_CMAKE_PATH "${IDF_PATH}" IDF_PATH) +set($ENV{IDF_PATH} "${IDF_PATH}") # # Load cmake modules