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.
This commit is contained in:
parent
da0f9717be
commit
dac6fd3434
1 changed files with 5 additions and 1 deletions
|
@ -18,7 +18,11 @@ endmacro()
|
||||||
|
|
||||||
if(CMAKE_HOST_WIN32)
|
if(CMAKE_HOST_WIN32)
|
||||||
# Prefer a prebuilt mconf-idf on Windows
|
# 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)
|
find_program(MCONF mconf-idf)
|
||||||
|
|
||||||
# Fall back to the old binary which was called 'mconf' not 'mconf-idf'
|
# Fall back to the old binary which was called 'mconf' not 'mconf-idf'
|
||||||
|
|
Loading…
Reference in a new issue