mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 14:13:15 +08:00
cmake(python): handle PYTHON3_LIMITED_API
- python-3.x => python-3 - config-3.x.py => config-3.py
This commit is contained in:
parent
221ddec845
commit
4b47c7dbd2
@ -164,7 +164,12 @@ if(OPENCV_SKIP_PYTHON_LOADER)
|
||||
endif()
|
||||
else()
|
||||
ocv_assert(DEFINED OPENCV_PYTHON_INSTALL_PATH)
|
||||
set(__python_binary_install_path "${OPENCV_PYTHON_INSTALL_PATH}/${__python_loader_subdir}python-${${PYTHON}_VERSION_MAJOR}.${${PYTHON}_VERSION_MINOR}")
|
||||
if(${PYTHON}_LIMITED_API)
|
||||
set(__python_binary_subdir "python-${${PYTHON}_VERSION_MAJOR}")
|
||||
else()
|
||||
set(__python_binary_subdir "python-${${PYTHON}_VERSION_MAJOR}.${${PYTHON}_VERSION_MINOR}")
|
||||
endif()
|
||||
set(__python_binary_install_path "${OPENCV_PYTHON_INSTALL_PATH}/${__python_loader_subdir}${__python_binary_subdir}")
|
||||
endif()
|
||||
|
||||
install(TARGETS ${the_module}
|
||||
@ -192,7 +197,7 @@ if(NOT OPENCV_SKIP_PYTHON_LOADER)
|
||||
set(CMAKE_PYTHON_EXTENSION_INSTALL_PATH_BASE "LOADER_DIR")
|
||||
endif()
|
||||
|
||||
if(DEFINED ${PYTHON}_VERSION_MINOR)
|
||||
if(DEFINED ${PYTHON}_VERSION_MINOR AND NOT ${PYTHON}_LIMITED_API)
|
||||
set(__target_config "config-${${PYTHON}_VERSION_MAJOR}.${${PYTHON}_VERSION_MINOR}.py")
|
||||
else()
|
||||
set(__target_config "config-${${PYTHON}_VERSION_MAJOR}.py")
|
||||
|
Loading…
Reference in New Issue
Block a user