mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 12:40:05 +08:00
Downgrade LIMITED_API_VERSION, if python3 is older than 3.6.
This commit is contained in:
parent
2791bb7062
commit
985506c251
@ -295,7 +295,12 @@ find_python("${OPENCV_PYTHON3_VERSION}" "${MIN_VER_PYTHON3}" PYTHON3_LIBRARY PYT
|
||||
OCV_OPTION(PYTHON3_LIMITED_API "Build with Python Limited API (not available with numpy >=1.15 <1.17)" NO
|
||||
VISIBLE_IF PYTHON3_NUMPY_VERSION VERSION_LESS "1.15" OR NOT PYTHON3_NUMPY_VERSION VERSION_LESS "1.17")
|
||||
if(PYTHON3_LIMITED_API)
|
||||
set(PYTHON3_LIMITED_API_VERSION "0x03060000" CACHE STRING "Minimal Python version for Limited API")
|
||||
set(_default_ver "0x03060000")
|
||||
if(PYTHON3_VERSION_STRING VERSION_LESS "3.6")
|
||||
# fix for older pythons
|
||||
set(_default_ver "0x030${PYTHON3_VERSION_MINOR}0000")
|
||||
endif()
|
||||
set(PYTHON3_LIMITED_API_VERSION ${_default_ver} CACHE STRING "Minimal Python version for Limited API")
|
||||
endif()
|
||||
|
||||
if(PYTHON_DEFAULT_EXECUTABLE)
|
||||
|
Loading…
Reference in New Issue
Block a user