opencv_contrib
opencv_contrib copied to clipboard
also link to CUDA::cufft_static in case of BUILD_SHARED_LIBS=OFF
In case BUILD_SHARED_LIBS is disabled, the cufft library is still linked to the dynamic version, whereas all other cuda libraries are linked to the static versions by appending CUDA_LIB_EXT. This PR makes cufft handles the same way as all other cuda libraries.
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
In any case someone uses older cmake versions: CUDA::cufft_static_nocallback starting in CUDA 9.2, requires CMake 3.23+
otherwise static linking does not work even with that fix.
https://cmake.org/cmake/help/latest/module/FindCUDAToolkit.html#cuda-toolkit-cufft
In any case someone uses older cmake versions: CUDA::cufft_static_nocallback starting in CUDA 9.2, requires CMake 3.23+
otherwise static linking does not work even with that fix.
https://cmake.org/cmake/help/latest/module/FindCUDAToolkit.html#cuda-toolkit-cufft
Should work with the latest changes as well. If the proper versions of cuda or cmake aren't met, it will fall back to dynamic libraries as was the behaviour previously.
@cudawarped I'm new to the OpenCV workflow, is there anything missing starting a build on the CI?
@cudawarped I'm new to the OpenCV workflow, is there anything missing starting a build on the CI?
No. One of the core maintainers needs to have time to check this is sensible before kicking off the CI. As this is the contrib repo this in not as high a priority.
@gregorburger Thanks a lot for the contribution! Could you push some change to the pr. Github Actions stuck and cannot be re-triggered.
@gregorburger Please rebase the PR to current 4.x.