]> granicus.if.org Git - esp-idf/commitdiff
cmake: Cleanups to work with Windows
authorAngus Gratton <angus@espressif.com>
Mon, 19 Mar 2018 03:17:31 +0000 (14:17 +1100)
committerAngus Gratton <gus@projectgus.com>
Sun, 29 Apr 2018 23:59:20 +0000 (09:59 +1000)
tools/cmake/idf_functions.cmake
tools/cmake/project.cmake

index 5ed4f3f88e7171bdac7897498fa011c909953d2e..923478231002e1b345d322aace26d663453b536d 100644 (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)
 
index ef5f6740d1eadbbbd62c23764542a1e5b777f8d4..b9fe126b98e2eea378250c25844cbdc794a46e14 100644 (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