# (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)
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