mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 11:10:21 +08:00
fix python cross-compilation
This commit is contained in:
parent
0726c4d4ea
commit
2c2645191a
@ -85,9 +85,9 @@ function(find_python preferred_version min_version library_env include_dir_env
|
||||
# not using _version_string here, because it might not conform to the CMake version format
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
# builder version can differ from target, matching base version (e.g. 2.7)
|
||||
find_host_package(PythonLibs "${_version_major_minor}")
|
||||
find_package(PythonLibs "${_version_major_minor}")
|
||||
else()
|
||||
find_host_package(PythonLibs "${_version_major_minor}.${_version_patch}" EXACT)
|
||||
find_package(PythonLibs "${_version_major_minor}.${_version_patch}" EXACT)
|
||||
endif()
|
||||
|
||||
if(PYTHONLIBS_FOUND)
|
||||
@ -105,7 +105,7 @@ function(find_python preferred_version min_version library_env include_dir_env
|
||||
set(_include_dir ${PYTHON_INCLUDE_DIR})
|
||||
set(_include_dir2 ${PYTHON_INCLUDE_DIR2})
|
||||
|
||||
# Clear find_host_package side effects
|
||||
# Clear find_package side effects
|
||||
unset(PYTHONLIBS_FOUND)
|
||||
unset(PYTHON_LIBRARIES)
|
||||
unset(PYTHON_INCLUDE_PATH)
|
||||
|
Loading…
Reference in New Issue
Block a user