Commit 30807b26 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #7644 from alalek:cmake_python_install

parents 12569dc7 edcbc15a
......@@ -132,13 +132,8 @@ endif()
if(NOT INSTALL_CREATE_DISTRIB AND DEFINED ${PYTHON}_PACKAGES_PATH)
set(__dst "${${PYTHON}_PACKAGES_PATH}")
install(TARGETS ${the_module} OPTIONAL
${PYTHON_INSTALL_CONFIGURATIONS}
RUNTIME DESTINATION "${__dst}" COMPONENT python
LIBRARY DESTINATION "${__dst}" COMPONENT python
${PYTHON_INSTALL_ARCHIVE}
)
else()
endif()
if(NOT __dst)
if(DEFINED ${PYTHON}_VERSION_MAJOR)
set(__ver "${${PYTHON}_VERSION_MAJOR}.${${PYTHON}_VERSION_MINOR}")
elseif(DEFINED ${PYTHON}_VERSION_STRING)
......@@ -146,13 +141,20 @@ else()
else()
set(__ver "unknown")
endif()
install(TARGETS ${the_module}
CONFIGURATIONS Release
RUNTIME DESTINATION python/${__ver}/${OpenCV_ARCH} COMPONENT python
LIBRARY DESTINATION python/${__ver}/${OpenCV_ARCH} COMPONENT python
)
if(INSTALL_CREATE_DISTRIB)
set(__dst "python/${__ver}/${OpenCV_ARCH}")
else()
set(__dst "python/${__ver}")
endif()
endif()
install(TARGETS ${the_module}
${PYTHON_INSTALL_CONFIGURATIONS}
RUNTIME DESTINATION "${__dst}" COMPONENT python
LIBRARY DESTINATION "${__dst}" COMPONENT python
${PYTHON_INSTALL_ARCHIVE}
)
unset(PYTHON_SRC_DIR)
unset(PYTHON_CVPY_PROCESS)
unset(CVPY_SUFFIX)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment