File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -151,6 +151,13 @@ jobs:
151151 echo "CUDA_nvcuvid_LIBRARY=$SDK_PATH/Lib/win/x64/nvcuvid.lib" | Out-File -FilePath $env:GITHUB_ENV -Append
152152 echo "CUDA_nvencodeapi_LIBRARY=$SDK_PATH/Lib/win/x64/nvencodeapi.lib" | Out-File -FilePath $env:GITHUB_ENV -Append
153153 echo "NVCUVID_INCLUDE_DIR=$SDK_PATH/Interface" | Out-File -FilePath $env:GITHUB_ENV -Append
154+ # OpenCV's WITH_NVCUVID/WITH_NVCUVENC detection only searches the CUDA toolkit
155+ # include/lib dirs (find_path); it ignores CMAKE_INCLUDE_PATH and CUDA_nvcuvid_LIBRARY.
156+ # Stage the SDK headers and import libs into the toolkit tree so detection succeeds,
157+ # otherwise the codec is silently compiled out ("NVCUVID: Header not found").
158+ echo "Staging Video Codec SDK headers/libs into CUDA toolkit ($env:CUDA_PATH)..."
159+ Copy-Item -Path "$SDK_PATH/Interface/*.h" -Destination "$env:CUDA_PATH/include/" -Force
160+ Copy-Item -Path "$SDK_PATH/Lib/win/x64/*.lib" -Destination "$env:CUDA_PATH/lib/x64/" -Force
154161 shell : pwsh
155162
156163 - name : Restore build artifacts
You can’t perform that action at this time.
0 commit comments