From 713f39ef71472746dee3d5f358a5956e99bcf081 Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Mon, 26 Apr 2021 20:58:28 -0400 Subject: [PATCH] Ensure we don't accidentally find a system python interp on windows --- CMakeModules/FindPythonInterp.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeModules/FindPythonInterp.cmake b/CMakeModules/FindPythonInterp.cmake index f2b57c6398..2664ef0bf5 100644 --- a/CMakeModules/FindPythonInterp.cmake +++ b/CMakeModules/FindPythonInterp.cmake @@ -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