|
|
|
@ -68,10 +68,16 @@ if(DEFINED OPENCV_PYTHON_INSTALL_PATH) |
|
|
|
|
endif() |
|
|
|
|
set(CMAKE_PYTHON_BINARIES_PATH "${CMAKE_PYTHON_BINARIES_INSTALL_PATH}") |
|
|
|
|
if (WIN32 AND HAVE_CUDA) |
|
|
|
|
if (ENABLE_CUDA_FIRST_CLASS_LANGUAGE) |
|
|
|
|
if (DEFINED CUDAToolkit_LIBRARY_ROOT) |
|
|
|
|
list(APPEND CMAKE_PYTHON_BINARIES_PATH "os.path.join(os.getenv('CUDA_PATH', '${CUDAToolkit_LIBRARY_ROOT}'), 'bin')") |
|
|
|
|
endif() |
|
|
|
|
else() |
|
|
|
|
if (DEFINED CUDA_TOOLKIT_ROOT_DIR) |
|
|
|
|
list(APPEND CMAKE_PYTHON_BINARIES_PATH "os.path.join(os.getenv('CUDA_PATH', '${CUDA_TOOLKIT_ROOT_DIR}'), 'bin')") |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
string(REPLACE ";" ",\n " CMAKE_PYTHON_BINARIES_PATH "${CMAKE_PYTHON_BINARIES_PATH}") |
|
|
|
|
configure_file("${PYTHON_SOURCE_DIR}/package/template/config.py.in" "${__python_loader_install_tmp_path}/cv2/config.py" @ONLY) |
|
|
|
|
install(FILES "${__python_loader_install_tmp_path}/cv2/config.py" DESTINATION "${OPENCV_PYTHON_INSTALL_PATH}/cv2/" COMPONENT python) |
|
|
|
|