From: Renz Christian Bagaporo Date: Thu, 13 Dec 2018 10:24:06 +0000 (+0800) Subject: mbedtls: fix issue with non idf.py build on windows X-Git-Tag: v3.3-beta2~176^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=72cd1ac43f7912bd37114e665423d57e024ee2c0;p=esp-idf mbedtls: fix issue with non idf.py build on windows --- diff --git a/components/mbedtls/CMakeLists.txt b/components/mbedtls/CMakeLists.txt index e138c2df8f..2f052e1805 100644 --- a/components/mbedtls/CMakeLists.txt +++ b/components/mbedtls/CMakeLists.txt @@ -18,7 +18,12 @@ endfunction() # Needed to for include_next includes to work from within mbedtls include_directories("${COMPONENT_PATH}/port/include") -if(MSYS) +# Needed in order to workaround issue with improper conversion to native path +# when building on MSYS2. This ensures that when building on MSYS, Unix style +# paths are used. +set(msystem $ENV{MSYSTEM}) + +if(MSYS OR msystem) set(CMAKE_HOST_UNIX 1) endif()