cmake: Fix Windows issue running menuconfig in Command Prompt if winpty on Path

Previous version assumed having winpty on the Path meant that it would be needed,
but some tools (like Atlassian Sourcetree) permanently add winpty to the path.

Symptom is arrow keys not working in menuconfig dialog.
pull/2683/head
Angus Gratton 2018-10-17 18:15:41 +11:00
rodzic da0f9717be
commit dac6fd3434
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -18,7 +18,11 @@ endmacro()
if(CMAKE_HOST_WIN32)
# Prefer a prebuilt mconf-idf on Windows
find_program(WINPTY winpty)
if(DEFINED ENV{MSYSTEM})
find_program(WINPTY winpty)
else()
unset(WINPTY CACHE) # in case previous CMake run was in a tty and this one is not
endif()
find_program(MCONF mconf-idf)
# Fall back to the old binary which was called 'mconf' not 'mconf-idf'