mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 14:13:15 +08:00
cuda: Add missing python CUDA dependency when CUDA is a first class language
This commit is contained in:
parent
92b588f30b
commit
9c05b27ba0
@ -68,8 +68,14 @@ if(DEFINED OPENCV_PYTHON_INSTALL_PATH)
|
||||
endif()
|
||||
set(CMAKE_PYTHON_BINARIES_PATH "${CMAKE_PYTHON_BINARIES_INSTALL_PATH}")
|
||||
if (WIN32 AND HAVE_CUDA)
|
||||
if (DEFINED CUDA_TOOLKIT_ROOT_DIR)
|
||||
list(APPEND CMAKE_PYTHON_BINARIES_PATH "os.path.join(os.getenv('CUDA_PATH', '${CUDA_TOOLKIT_ROOT_DIR}'), 'bin')")
|
||||
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}")
|
||||
|
Loading…
Reference in New Issue
Block a user