[moved from opencv] Fix errors when building with cuda stubs

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).

original commit: 22ee5c0c4d
pull/2727/head^2
Rob Timpe 4 years ago
parent 10bfd2dc51
commit 5b640a53f1
  1. 5
      modules/cudaarithm/src/lut.cpp

@ -4,8 +4,6 @@
#include "precomp.hpp"
#include "lut.hpp"
using namespace cv;
using namespace cv::cuda;
@ -15,6 +13,9 @@ Ptr<LookUpTable> cv::cuda::createLookUpTable(InputArray) { throw_no_cuda(); retu
#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);

Loading…
Cancel
Save