Skip to content

Commit 72cac5e

Browse files
committed
Merge pull request opencv#3065 from alalek:fix_binary_package_build
2 parents 62f9021 + b3a54d5 commit 72cac5e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmake/OpenCVDetectPython.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ function(find_python preferred_version min_version library_env include_dir_env
2626
libs_found libs_version_string libraries library debug_libraries
2727
debug_library include_path include_dir include_dir2 packages_path
2828
numpy_include_dirs numpy_version)
29+
30+
ocv_check_environment_variables(${executable})
31+
if(${executable})
32+
set(PYTHON_EXECUTABLE "${${executable}}")
33+
endif()
34+
2935
if(WIN32 AND NOT ${executable})
3036
# search for executable with the same bitness as resulting binaries
3137
# standard FindPythonInterp always prefers executable from system path

0 commit comments

Comments
 (0)