cmake: Cleanups to work with Windows

This commit is contained in:
Angus Gratton 2018-03-19 14:17:31 +11:00 committed by Angus Gratton
parent 6bdc49b6e4
commit 2ea359ad0c
2 changed files with 4 additions and 4 deletions

View file

@ -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)

View file

@ -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