Ensure we don't accidentally find a system python interp on windows

This commit is contained in:
Marek Roszko 2021-04-26 20:58:28 -04:00
parent 50fd94d35d
commit 713f39ef71
1 changed files with 4 additions and 2 deletions

View File

@ -73,8 +73,10 @@ if( ${PYTHON_ROOT_DIR} )
PATHS ${PYTHON_ROOT_DIR}
NO_DEFAULT_PATH )
else()
# If there is no specific path given, look for python in the path
find_program(PYTHON_EXECUTABLE NAMES ${_Python_NAMES})
if(NOT VCPKG_TOOLCHAIN)
# If there is no specific path given, look for python in the path
find_program(PYTHON_EXECUTABLE NAMES ${_Python_NAMES})
endif()
endif()
# Set up the versions we know about, in the order we will search. Always add