• Michael Pratt's avatar
    Build Python 3 bindings in subdirectory · 7d41ce23
    Michael Pratt authored
    Build the Python 3 cv2 module in lib/python3/, to avoid potential naming
    conflicts with the Python 2 bindings.
    
    The Python 2 bindings are placed directly in lib/, where they are
    required for the Buildbot to successfully execute the Python tests.
    7d41ce23
CMakeLists.txt 908 Bytes
if(NOT PYTHON3LIBS_FOUND OR NOT PYTHON3_NUMPY_INCLUDE_DIRS)
  ocv_module_disable(python3)
endif()

set(the_description "The python3 bindings")
set(MODULE_NAME python3)
set(MODULE_INSTALL_SUBDIR python3)

set(PYTHON_INCLUDE_PATH ${PYTHON3_INCLUDE_PATH})
set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON3_NUMPY_INCLUDE_DIRS})
set(PYTHON_EXECUTABLE ${PYTHON3_EXECUTABLE})
set(PYTHON_DEBUG_LIBRARIES ${PYTHON3_DEBUG_LIBRARIES})
set(PYTHON_LIBRARIES ${PYTHON3_LIBRARIES})
set(PYTHON_PACKAGES_PATH ${PYTHON3_PACKAGES_PATH})
set(PYTHON_VERSION_MAJOR ${PYTHON3_VERSION_MAJOR})
set(PYTHON_VERSION_MINOR ${PYTHON3_VERSION_MINOR})

include(../common.cmake)

unset(MODULE_NAME)
unset(MODULE_INSTALL_SUBDIR)
unset(PYTHON_INCLUDE_PATH)
unset(PYTHON_NUMPY_INCLUDE_DIRS)
unset(PYTHON_EXECUTABLE)
unset(PYTHON_DEBUG_LIBRARIES)
unset(PYTHON_LIBRARIES)
unset(PYTHON_PACKAGES_PATH)
unset(PYTHON_VERSION_MAJOR)
unset(PYTHON_VERSION_MINOR)