mirror of
https://github.com/opencv/opencv.git
synced 2025-07-31 01:47:12 +08:00

Fixes two errors when building with the options WITH_CUDA=ON and BUILD_CUDA_STUBS=ON on a machine without CUDA. In the cudaarithm module, make sure cuda_runtime.h only gets included when CUDA is installed. In the stitching module, don't assume that cuda is present just because cudaarithm and cudawarping are present (as is the case when building with the above options).
25 lines
699 B
C++
25 lines
699 B
C++
// This file is part of OpenCV project.
|
|
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
|
// of this distribution and at http://opencv.org/license.html.
|
|
|
|
#include "precomp.hpp"
|
|
|
|
using namespace cv;
|
|
using namespace cv::cuda;
|
|
|
|
#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER)
|
|
|
|
Ptr<LookUpTable> cv::cuda::createLookUpTable(InputArray) { throw_no_cuda(); return Ptr<LookUpTable>(); }
|
|
|
|
#else /* !defined (HAVE_CUDA) || defined (CUDA_DISABLER) */
|
|
|
|
// lut.hpp includes cuda_runtime.h and can only be included when we have CUDA
|
|
#include "lut.hpp"
|
|
|
|
Ptr<LookUpTable> cv::cuda::createLookUpTable(InputArray lut)
|
|
{
|
|
return makePtr<LookUpTableImpl>(lut);
|
|
}
|
|
|
|
#endif
|